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
Question
Q# Which of the following might have only method signatures?
Group of answer choices
1. An interface
2. An abstract class and a concrete class
3. An abstract class
4. An interface and an abstract class
5. None of these, they all require the implementation.
6. A concrete class
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 3 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
- Define a Card class which contains three PRIVATE (why?) variables for card suit, face value and the third (could be Boolean) to indicate if the card is drawn or not (these are states of a card object) plus operations that can be performed on a card (these are behaviors), The operations include: · Define 3 pairs of accessor and mutator methods for accessing these 3 private variables of a card respectively · Define a constructor that takes three parameters (suit and face value) to instantiate a card with the third parameter indicating that the card has not been drawn at the time of creation of the card. · Define (Override) the method toString to display the card (show both suit and face value) · Define one drawcard method that randomly draws a card by first checking if the card has been drawn. If the card has been drawn, the method has to draw another card that has not been drawn and the method returns a card object. This method looks like: public Card…arrow_forwardWrite the definition of classes and interfaces in the given diagram using following details: a) Interface shape has a method draw(). b) Override the method draw() in all subclasses. c) Define a non-abstract method fillColor() in Circle class. (I want the complete solution using the codes in bluej program also diagram) bluejarrow_forwardMake sure you know the difference between an abstract class and an interface and constructors.arrow_forward
- An instance of an abstract class is made by using the keyword 'new'. true or falsearrow_forwardQUESTION 16 What must be true of a class with one abstract method? O The class must also implement the Iterable interface Any derived class must implement the method The abstract method must have the static modifier O The method cannot specify a return value QUESTION 17 Suppose we wanted to design a set of classes for a veterinarian's office. Our Customer class looks like this: public class Customer { Pet [] pets; } Select all the statements that are true Once the size of the pets array has been set, it cannot be changed Because we're using an array, all pets must be the same A customer must have at least one pet We also need to declare a Pet class QUESTION 18 What is the proper use of an enumeration? To define a set of ordered values To enforce the use of the Comparable interface O To define, or enumerate, the values returned by a Random object generator O To define the classes in an inheritance hierarchyarrow_forwardAnswer with True or False for the following. Explain your answers.-It is legal to write a method in a class which overloads another method declared in the same.-It is legal to write a method in a superclass which overrides a method declared in a sub-class.arrow_forward
- When should one use an abstract class, when should one use an interface, and when should one use both?arrow_forwardIf class A is a subclass of class B, then A has access to all of B's instance variables, including private ones. True Falsearrow_forward5. Is it compulsory for a class, which has been declared as abstract, to have at least one abstract method?arrow_forward
- Both abstract classes and interfaces may be used to specify the behavior of common objects.Which factors should you examine when deciding between an interface and an abstract class?arrow_forwardYou need to perform following things to demonstrate the concept of abstract class. Step 1: Create the abstract class that has following methods. • Calculate the area of circle(Abstract method) • Calculate the area of triangle(Abstract method) • Calculate the area of rectangle(Method with implementation) Step 2: Create another class that extends above class and provide implementation of abstract methods. Step 3: Create the main method inside above class and display output of area of circle, area of triangle and area of rectangle. You need to submit the following things: • Java program with both the classes An output screenshot created using Microsoft Wordarrow_forwardCreate a short program in Java which contains the below information: - Has one abstract and two regular classes - Has two interfaces (the two regular classes have to implement at least one interface - At least one regular class must implement both interfaces - The two classes have to extend the abstract class - The abstract class must have a method - At least one interface must have a method - At least two fields in each class, this includes the superclass - All fields are instantiated within the constructorarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
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