
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
In Java, implement Abstraction in the grading system. Include three different implementation methods in solving the grade. Kindly follow the example of coding below (abstract class should be included):
Example:
Prelim 30
Midterm 30
Endterm 40
---------------------
Formula: (Prelim+ Midterm + Endterm)/3
------------------------------
![//abstract parent class
abstract class Animal{
//abstract method
public abstract void sound ();
//Dog class extends Animal class
public class Dog extends Animal{
public void sound (){
System.out.println("Woof");
}
public static void main(String args[]){
Animal obj
obj.sound ();
}
}
= new Dog();
Output:
Woof](https://content.bartleby.com/qna-images/question/cfaf8c40-8a87-4df8-8850-e84c1211eb30/17d7d9a7-860f-4be6-8fb1-c6e0022d2941/n8mwu5w_thumbnail.jpeg)
Transcribed Image Text://abstract parent class
abstract class Animal{
//abstract method
public abstract void sound ();
//Dog class extends Animal class
public class Dog extends Animal{
public void sound (){
System.out.println("Woof");
}
public static void main(String args[]){
Animal obj
obj.sound ();
}
}
= new Dog();
Output:
Woof
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
- Could someone explain (give like 1 or 2 sentences (nothing too long)) about how JAVA readability can use Orthogonality? I am working on a HW and need to talk about 2 sub-categories (I choose simplicity and orthogonality) and for simplicity, I said "Simplicity can be utilized here too since there is more than one way to accomplish a particular operation (like a+=1; a++; a=a+1).". So I need a simple yet different example on how readability in java can actually use Orthogonality. (NO CODE, just words).arrow_forwardA binary operator is an operation that is performed on two operands. For example, addition is a binary operator that adds two operands (e.g., 2 + 4). In the provided UML diagram, all binary operators have two operands and an execute method that performs the appropriate operation on the operands. The AddOperation class should add the two operands. The SubtractOperation class should subtract the two operands. Here is an example of how a binary operator could be used: IBinaryOperator operator = new AddOperator(8, 12);System.out.println(operator.execute()); // should print 20operator.setLeftOperand(18);System.out.println(operation.execute()); // should print 30 crate a Main.java to test your codearrow_forwardIn the class diagram below we have a parking charge class for an object-oriented parking system that is to be designed using java. Briefly explain any implementation decisions and the reasoning behind those without writing the complete code. N.B explain how the implementation will proceed instead of writing codearrow_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