Starting out with Visual C# (4th Edition)
4th Edition
ISBN: 9780134382609
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 10, Problem 2MC
In an inheritance relationship, the_______ is the general class.
a. derived class
b. base class
c. dependent class
d. child class
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
A constructor has the same name as the class and is automatically called when a new object of the class is created. It is used to perform initialization functions. A constructor may or may not have input arguments.
The keyword extends is used to indicate inheritance. Class B extends Class A implies that Class B is inheriting the attributes and methods of class A. Class A is the base class and Class B is the derived class. It is also possible for the derived class to reference the constructor of the base class in its constructor. This will avoid duplicating initialization functions.
note:write the java code and don't use any package
A class that represents a more specific entity in an inheritance hierarchy is called a/an _____. Please explain.
Default class
Superclass
Subclass
Inheritance class
The properties of a child class are inherited by the parent class.
Select one:
True
False
Chapter 10 Solutions
Starting out with Visual C# (4th Edition)
Ch. 10.1 - In this section, we discussed base classes and...Ch. 10.1 - Prob. 10.2CPCh. 10.1 - What does a derived class inherit from its base...Ch. 10.1 - Look at the following code, which is the first...Ch. 10.1 - Briefly summarize the constructor issues in...Ch. 10.2 - Look at the following class definitions: class...Ch. 10.2 - Does the is a relationship work in reverse? Why or...Ch. 10.3 - What is the purpose of an abstract class?Ch. 10.3 - If a class is abstract, what cannot be done with...Ch. 10.3 - If a class is derived from a base class that has...
Ch. 10.3 - What must be done with an abstract property before...Ch. 10.3 - How can you create an abstract read-only property?Ch. 10 - When one object is a specialized version of...Ch. 10 - In an inheritance relationship, the_______ is the...Ch. 10 - In an inheritance relationship, the___________ is...Ch. 10 - Base classes are sometimes called____________. a....Ch. 10 - Derived classes are sometimes called______________...Ch. 10 - The refers to the base class. a. friend keyword b....Ch. 10 - Prob. 7MCCh. 10 - When a derived class method has the same name as a...Ch. 10 - The declares that a derived class is allowed to...Ch. 10 - The declares that this method overrides a method...Ch. 10 - A class that is not intended to be instantiated,...Ch. 10 - To declare a class as abstract, you use the...Ch. 10 - A regular, nonabstract class is sometimes called a...Ch. 10 - A(n) __________ is a method that appears in a base...Ch. 10 - A(n) __________ is a property that appears in a...Ch. 10 - __________ allows a base class reference variable...Ch. 10 - The base class inherits fields, properties, and...Ch. 10 - Polymorphism allows a class variable of the base...Ch. 10 - Properties in a base class cannot be overridden in...Ch. 10 - A base class reference variable can reference an...Ch. 10 - A statement that tries to use the new operator to...Ch. 10 - A class that is not intended to be instantiated,...Ch. 10 - When an abstract property appears in a class, it...Ch. 10 - What does a derived class inherit from its base...Ch. 10 - Look at the following code, which is the first...Ch. 10 - Can methods in the derived class directly access...Ch. 10 - When you create an instance of a derived class,...Ch. 10 - In what kind of situation would you want to use an...Ch. 10 - What is primary difference between an abstract...Ch. 10 - Can abstract classes also contain abstract...Ch. 10 - Write the first line of the definition for a...Ch. 10 - Look at the following class declarations: class...Ch. 10 - Write a parameterized constructor for a base class...Ch. 10 - Prob. 4AWCh. 10 - Create an abstract class called Star. Include an...Ch. 10 - Employee and ProductionWorker Classes Create an...Ch. 10 - ShiftSupervisor Class In a particular factory, a...Ch. 10 - TeamLeader Class In a particular factory, a team...Ch. 10 - Person and Customer Classes Design a class named...Ch. 10 - PreferredCustomer Class A retail store has a...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Write a function named get_first_name that asks the user to enter his or her first name, and returns it.
Starting Out with Python (4th Edition)
Using pseudocode similar to the Java class syntax of Figure 8.27, sketch a definition of an abstract data type ...
Computer Science: An Overview (12th Edition)
Name the three expressions that appear inside the parentheses in the for loops header.
Starting Out with C++ from Control Structures to Objects (8th Edition)
Describe the three types of anomalies that can arise in a table and the negative consequences of each.
Modern Database Management
Explain how entities are transformed into tables.
Database Concepts (7th 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
- The base class constructors are called before derived class constructor so that the Derived class constructor can assume members of the base class object have already been initialized. answer choices True Falsearrow_forwardThe ability to create classes that share the attributes and methods of existing classes but with more specific features is known as : Abstraction Polymorphism Typecasting Inheritancearrow_forwardSearch courses Midterm Exam Spring21 All the following is true about private inheritance except Select one O A derived class member functions have access to all protected members inherited from the base clasS O A derived class objects does not have access to public members inherited from the base class A derived class inherits all base class methods including.constructors, destructors and copy constructor of the base class. O The constructor of a derived class can trigger a call to the constructor of the base class in the headinge the function definition, O Adenved class objects does not have access to the private and protected members inhented from the base class, OAll the statements are true GEarrow_forward
- Polymorphism : Write a driver program that uses a AECar reference variable to point to three different types of classes, showing that inheritance is one mechanism for using polymorphism.arrow_forward:Single inheritance means one class inheriting from one super classes more classes inheriting from one super class more classes inheriting from more super classes None of the abovearrow_forwardIf a class is abstract, what cannot be done with the class?arrow_forward
- The ability to create classes with more specific attributes and methods that share the properties and methods of existing classes is referred to as: Abstraction Polymorphism Typecasting Inheritancearrow_forwardProgramming Assignment #5 Educational Objectives: After completing this assignment the student should have the following knowledge, ability, and skills: Define a class hierarchy using inheritance Define virtual member functions in a class hierarchy Implement a class hierarchy using inheritance Implement virtual member functions in a class hierarchy Use initialization lists to call parent class constructors for derived class constructors Operational Objectives: Create (define and implement) a base class Shape classes that will inherit this class called Box, Rectangle, Circle, and Triangle Description: Programming Specifications: You will have a base class of Shape which will have an area and perimeter of type double. You must also create acceptable Gets and Sets for the private data items. All of the other classes will inherit this class. You will have a class Square which will have just one length of type double. You should create acceptable Gets and Sets for the one…arrow_forwardIn a class with overloaded constructors, each version of the constructor must have a differentarrow_forward
- Parent Class: Food Write a parent class called Food. A food is described by a name, the number of grams of sugar (as a whole number), and the number of grams of sodium (as a whole number). Core Class Components For the Food class, write: the complete class header the instance data variables a constructor that sets the instance data variables based on parameters getters and setters; use validity checking on the parameters where appropriate a toString method that returns a text representation of a Food object that includes all three characteristics of the food Class-Specific Method Write a method that calculates what percent of the daily recommended amount of sugar is contained in a food. The daily recommended amount might change, so the method takes in the daily allowance and then calculates the percentage. For example, let's say a food had 6 grams of sugar. If the daily allowance was 24 grams, the percent would be 0.25. For that same food, if the daily allowance was 36 grams, the…arrow_forwardprotected class members are only accessible inside the class (true/false) it’s possible to set the value of a private member variable of a class (true/false) setter and getter functions should be private (true/false)arrow_forwardDefault constructors are inherited from the base class, thereby eliminating the need for derived classes to define their own default constructors. O True O Falsearrow_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
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
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
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
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