Starting Out with Python (3rd Edition)
3rd Edition
ISBN: 9780133582734
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 11, Problem 3MC
Suppose a program uses two classes: Airplane and Jumbo Jet. Which of these would most likely be the subclass?
a. Airplane
b. JumboJet
c. Both
d. Neither
Expert Solution & Answer
Learn your wayIncludes step-by-step video
schedule02:47
Students have asked these similar questions
Design an Essay class that is derived from the GradedActivity class presented in thischapter. The Essay class should determine the grade a student receives on an essay.The student’s essay score can be up to 100, and is determined in the following manner:• Grammar: 30 points• Spelling: 20 points• Correct length: 20 points• Content: 30 pointsDemonstrate the class in a simple program.
Static members of a class are... When and how can you take advantage of these opportunities?
Implement the following using JAVA:
a.Design a class named Person and its two subclasses named Student andEmployee.
b.Make Faculty and Staff subclasses of Employee.
Please note that,● A person has a name, address, phone number, and email address. A student has aclass status (freshman,sophomore, junior, or senior). You can define the status as aconstant.● An employee has office & salary.● A faculty member has office hours and a rank.● A staff member has a title.
c. Draw a UML diagram of the system.
Chapter 11 Solutions
Starting Out with Python (3rd Edition)
Ch. 11.1 - In this section, we discussed superclasses and...Ch. 11.1 - Prob. 2CPCh. 11.1 - What does a subclass inherit from its superclass?Ch. 11.1 - Look at the following code, which is the first...Ch. 11.2 - Look at the following class definitions: class...Ch. 11 - In an inheritance relationship, the ___________ is...Ch. 11 - In an inheritance relationship, the _________ is...Ch. 11 - Suppose a program uses two classes: Airplane and...Ch. 11 - This characteristic of object-oriented programming...Ch. 11 - Prob. 5MC
Ch. 11 - Polymorphism allows you to write methods in a...Ch. 11 - It is not possible to call a superclasss _ _init_...Ch. 11 - A subclass can have a method with the same name as...Ch. 11 - Only the _ _init_ _method can be overridden.Ch. 11 - You cannot use the isinstance function to...Ch. 11 - What does a subclass inherit from its superclass?Ch. 11 - Look at the following class definition. What is...Ch. 11 - Prob. 3SACh. 11 - Write the first line of the definition for a...Ch. 11 - Look at the following class definitions: class...Ch. 11 - Look at the following class definition: class...Ch. 11 - Employee and ProductionWorker Classes Write an...Ch. 11 - ShiftSupervisor Class In a particular factory, a...Ch. 11 - Person and Customer Classes The Person and...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Dynamic String Stack Design a class that stores strings on a dynamic stack. The strings should not be fixed in ...
Starting Out with C++ from Control Structures to Objects (9th Edition)
The decimal number 17 is equal to the binary number 10010 11000 10001 01001
Digital Fundamentals (11th Edition)
Suppose your code creates an object of the class Scanner named keyboard (as described in this chapter). Write c...
Absolute Java (6th Edition)
Which category of C++ reference variables always produces aliases?
Concepts Of Programming Languages
3.12 (Date Create a class called Date that includes three pieces Of information as data
members—a month (type ...
C++ How to Program (10th Edition)
Which loop should you use when you know the number of required iterations?
Starting Out with Java: From Control Structures through Objects (6th Edition)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Consider the following class public class Ketchup extends Food implements Tasty{ public String brand; private Snack snack; } Select ALL that are correct based this class. Ketchup is a Food Ketchup is a Tasty Ketchup is an Object Ketchup is a Snack Food is a Tasty Snack is a Tasty Food is a Snackarrow_forwardsubject: object-oriented programming in your library there are two types of books. one category is literature books and the second category is generals. litrature books have the authorID, authorname literature theme language, publisher, volumn,, yearofpubication, journal have attributes volumn, issue, publisher,yearofpublication,journalID, technical sponser. design a parent class books extend two classes literaturebooks and journel from parent class make constructor , setter, and getterarrow_forwardThe Essay class has a default constructor, a constructor with two parameters, and a constructor with three parameters. Declare the following objects: essay1 with no arguments essay2 with essayTitle and essayAuthor as arguments essay3 with essayTitle, essayAuthor, and essayYear as arguments Ex: If the input is Painting Cole 1919, then the output is: Essay: Undefined, Unspecified, 0 Essay: Painting, Cole, 0 Essay: Painting, Cole, 1919 Archive.java public class Archive { publicstaticvoidmain(String[] args) { Scannerscnr=newScanner(System.in); StringessayTitle; StringessayAuthor; intessayYear; essayTitle=scnr.next(); essayAuthor=scnr.next(); essayYear=scnr.nextInt(); /* Your code goes here */ essay1.print(); essay2.print(); essay3.print(); } } Essay.java public class Essay { private String title; private String author; private int year; public Essay() { // Default constructor title = "Undefined"; author = "Unspecified"; year = 0; }…arrow_forward
- java languageCreate a class with following attributes: The car's make The car's model The car's year Now let's identify the class's methods. Specifically, the actions are: Constructor of Car class Set and get the car's make Set and get the car's model Set and get the car's year Now create few instance of the Car in a Test class. Use getter and setter to set the instance variables. Create a class with following attributes: The car's make The car's model The car's year Now let's identify the class's methods. Specifically, the actions are: Constructor of Car class Set and get the car's make Set and get the car's model Set and get the car's year Now create few instance of the Car in a Test class. Use getter and setter to set the instance variables.arrow_forward1. Create a Person class. The variables are name, height, and age. 2. Create a Student class that is a child class (i.e. inherits from) Person. Student should have variables address and school.arrow_forwardNote: Write a java programarrow_forward
- Create a class student and then create an object of this class and work with it. Idfirst namelast namegradesdate of birthfield of studyenrolled coursesenrolled semester using constructors, setters-getters in JAVA programmingID must be generatedarrow_forward1. Write the java code for the following class diagram. Mention the method overridden. Vehicle Car void: stop() int: speed() int :speed() void :m agearrow_forwardPet.java - An abstract class to represent the concept of a pet. A pet should have a name, a gender and a sound (choose appropriate data-types for these). Dog.java - an implementation of the pet concept. A dog should have a "woof" sound, and it should have a Bone (see Bone.java description below). Cat.java - an implementation of the pet concept. A cat should have a "meoh" sound, and it should have a Fish (see Fish.java description below). Bone.java - should be a minimal class which composes a String "$==$" which is its printString (further, a toString() method should be implemented that returns the printString. Fish.java - similar to Bone.java only the printString is "}==*-> PersonWithAPet.java - should contain a class Person which contains a Pet reference. There should be a method to setPet(:Pet) that accepts any subclass of Pet Runner.java - should be the main class that executes to create a Cat with a Fish, a Dog with a Bone, - two Person objects (one with the Cat, one with the Dog,…arrow_forward
- PYTHON CLASSES AND OBJECTarrow_forwardPYTHON: Define the Artist class with a constructor to initialize an artist's information and a print_info() method. The constructor should by default initialize the artist's name to "None" and the years of birth and death to 0. print_info() should display Artist Name, born XXXX if the year of death is -1 or Artist Name (XXXX-YYYY) otherwise. Define the Artwork class with a constructor to initialize an artwork's information and a print_info() method. The constructor should by default initialize the title to "None", the year created to 0, and the artist to use the Artist default constructor parameter values. Ex: If the input is: Pablo Picasso 1881 1973 Three Musicians 1921 the output is: Artist: Pablo Picasso (1881-1973) Title: Three Musicians, 1921 If the input is: Brice Marden 1938 -1 Distant Muses 2000 the output is: Artist: Brice Marden, born 1938 Title: Distant Muses, 2000 I have the code but I am getting errors that I can't seem to get rid of any suggestions would be appreciatedarrow_forwardJava Questions - Based on the code, which answer out of the choices "1, 2, 3, 4, 5" is correct. Explanation is not needed, just please make sure that the answer you have chosen is the correct option. Thanks. Question is in attached picture.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Introduction to Classes and Objects - Part 1 (Data Structures & Algorithms #3); Author: CS Dojo;https://www.youtube.com/watch?v=8yjkWGRlUmY;License: Standard YouTube License, CC-BY