Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Question 30
Which of the following description is TRUE?
Inheritance allows us to define a class based on another class. Child classes receive all the features from the parent class but can NOT have their own additional features. |
||
Abstraction means that a method in a parent class can have a number of different implementations in child classes. |
||
An interface is a completely abstract class, which contains abstract properties, methods, and variables. |
||
The private access modifier makes members accessible only from within the class and hides them from the outside. |
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
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
- Abstract classes and interfaces may both be used to accomplish the goal of defining the behaviour of common objects.Which factors should you take into account when deciding whether to utilise an interface or an abstract class?arrow_forwardJava - If the programmer doesn't declare any constructors for an extended class, what constructors will be inherited from the superclass? How does this inherited constructor initialize new instance variables that are not part of the superclass?arrow_forwardOverview Construct a hierarchy of classes representing savings and checking accounts as well as a means to ‘filter’ account objects. Account Classes Your solution will consist of 4 account classes as described below. It is your responsibility to define the exact relationship among those classes and translate that relationship into source code structure. There is a correct structure; the skeleton must be modified to reflect the correct relationships. Account – represents a general account with basic operations such as deposit, withdraw, etc. Savings – represents a savings account that must maintain a minimum balance. Checking – represents a checking account that has no minimum balance (this means a zero balance). CappedChecking – represents a checking account that disallows a balance above a particular maximum value. Linking Accounts A bank or credit typically allows a user the ability to link accounts together. That is, I might wish to link my checking account with my savings…arrow_forward
- Create a UML Class Model based on the requirements . Your Class Model is to include: All classes Attributes and Attribute Types Associations Multiplicity Primary and Foreign keys Any Inheritance, Composition or Aggregation. Building Maintenance system. A rental property management company wants to develop a ‘Building Maintenance System.’ This system will be used by the company to manage maintenance requests from tenants in the several rental buildings that it manages in the city. Each building has a maintenance manager. The maintenance manager is responsible for creating accounts in the system for each tenant in their building. A tenant can rent multiple apartments within the same building. Tenants can submit maintenance requests using this system. Each maintenance request will have a request ID, category, and description. The maintenance manager manages a maintenance crew in their building. Maintenance crew members can be members of more than one maintenance team. Maintenance crew…arrow_forwardUse the Animal class file given on the final exam module. Use Inheritance and Polymorphism concepts to create the following classes and functions. Create the following classes that derive from the Animal class. Monkey Kangaroo Create a derived class named Spider Monkey whose base class is Monkey. Create constructors for each class. Create destructors for each class. All classes will have the following private instance fields, including Animal legs that will initialize to 0 boolean swim that will initialize to false; All classes will have the following polymorphic methods, including Animal getLegs( ) – this returns the number of legs the animal has makeSount( ) – this outputs the type of sound the animal makes makeSound( ) method will be a virtual function in the Animal class Create an exception in the getLegs( ) method that makes sure the number of legs are valid (only allow positive number amount of legs) Create a main method to demonstrate the all functions including the…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_forward
- It is necessary for a subclass of an abstract class to implement all of the abstract methods that are defined for the parent class. Is there a mistake or is it accurate?arrow_forwardIn what kinds of situations would you find it more beneficial to make use of an abstract class as opposed to a base class?arrow_forwardClass Relationships Exercises 1. In Java, we use inheritance for "is-a" relationships. Containment, on the other hand, indicates that one object has another object. These are "has-a" relationships. For the following relationships, determine if they are a "is-a" or a "has-a" relationship: o bicycle - vehicle o car - engine o pizza - topping o food - pizza o dog - mammal 2. Share with someone else 3 other examples for each of the following relationships: o Inheritance ("is-a" relationship) o Containment ("has-a" relationship) 3. public class PersonInfo { protected String firstName; protected String birthdate; } public class ChildInfo extends PersonInfo { private String schoolName; } public class MotherInfo extends PersonInfo { private String spousename; private ChildInfo children1; private ChildInfo children2; private ChildInfo children3; ... } A. Draw the relationships for the classes above using UML. If a class inherits from another class, draw an open arrow pointing to the base class…arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education