Part-2 (Encapsnlation, Inheritance, Polymorphism) Create a Java project that demonstrates various object oriented concepts you have learned so far in this course (encapsulation, inheritance and polymorphism). To do this, create a super class and at least 2 subelasses. You can cither do multilevel inheritance or hiearchical inheritance in this to complete this part-2 task. The super class will have following propertics/functionalities: a) Create a total of 3 member variables for the class, sclecting the appropriate data types for cach ficld. b) Include an argument constructor in this Class, that will initialize all data fields. c) Encapsulate this Class. The two subclasses will have bclow properties/functionalitics: a) One of the subclasses will have at least one member variable and other subclass with at least two member variables. b) Have two constructors in cach subclass: • One constructor for initializing only super class data Another constructor will initialize both super and subclass data. c) Encapsulate the subelasses. d) You should include overloaded methods in any of the classes you have created (superelass or subclass). c) Override the toString() method in cach of your Classes. f) Override the equals() method in cach of your Classes. The test class lwith the main 0 methodl will perform below tasks: a) Create objects of superclass and cach subclass types invoking all constructors and Draw the object diagram for each of the object created. b) Use setter methods to fill missing data in all objects. c) Generate outputs demonstrating overloading, overriding outputs. d) Create object of subclass (actual type] and store it in superclass object [declared type]. c) Generate output for instanceof operator. ) Do object casting (show both implicit and explicit) g) Generate output for constructor chaining (using this and super keywords] Note: 1) Draw object diagrams wherever possible and necessary to show the state of the objects created Include the below in your project report: The UML diagram of all Classes. Screenshots of all output generated from the application.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%
Part-2 (Encapsulation, Inheritance, Polymorphism)
Create a Java project that demonstrates various object oriented concepts you have learned so far
in this course (encapsulation, inheritance and polymorphism). To do this, create a super class and
at least 2 subclasses. You can cither do multilevel inheritance or hierarchical inheritance in this
to complete this part-2 task.
The super class will have following propertics/functionalitics:
a) Create a total of 3 member variables for the class, sclecting the appropriatc data types
for cach ficld,
b) Include an argument constructor in this Class, that will initialize all data fields.
c) Encapsulate this Class.
The two subclasses will have bclow properties/functionalitics:
a) One of the subclasses will have at lcast one membecr variable and other subclass with at
least two member variables.
b) Have two constructors in cach subclass:
One constructor for initializing only super class data
Another constructor will initialize both super and subclass data.
c) Encapsulate the subclasses.
d) You should include overloaded methods in any of the classes you have created
(superclass or subclass).
c) Override the toString( ) method in cach of your Classes.
f) Override the equals( ) method in cach of your Classes.
The test class with the main ) methodl will perform below tasks:
a) Create objects of superclass and cach subclass types invoking all constructors and Draw
the object diagram for each of the object created.
b) Use setter methods to fill missing data in all objects.
c) Generate outputs demonstrating overloading, overriding outputs.
d) Create object of subclass [actual type] and store it in superclass object [deelared type].
c) Generate output for instanceof operator.
) Do object casting (show both implicit and explicit)
g) Generate output for constructor chaining fusing this and super keywords]
Note:
1) Draw object diagrams wherever possible and necessary to show the state of the objects
created
Include the below in your project report:
The UML diagram of all Classes.
Sereenshots of all output generated from the application.
Transcribed Image Text:Part-2 (Encapsulation, Inheritance, Polymorphism) Create a Java project that demonstrates various object oriented concepts you have learned so far in this course (encapsulation, inheritance and polymorphism). To do this, create a super class and at least 2 subclasses. You can cither do multilevel inheritance or hierarchical inheritance in this to complete this part-2 task. The super class will have following propertics/functionalitics: a) Create a total of 3 member variables for the class, sclecting the appropriatc data types for cach ficld, b) Include an argument constructor in this Class, that will initialize all data fields. c) Encapsulate this Class. The two subclasses will have bclow properties/functionalitics: a) One of the subclasses will have at lcast one membecr variable and other subclass with at least two member variables. b) Have two constructors in cach subclass: One constructor for initializing only super class data Another constructor will initialize both super and subclass data. c) Encapsulate the subclasses. d) You should include overloaded methods in any of the classes you have created (superclass or subclass). c) Override the toString( ) method in cach of your Classes. f) Override the equals( ) method in cach of your Classes. The test class with the main ) methodl will perform below tasks: a) Create objects of superclass and cach subclass types invoking all constructors and Draw the object diagram for each of the object created. b) Use setter methods to fill missing data in all objects. c) Generate outputs demonstrating overloading, overriding outputs. d) Create object of subclass [actual type] and store it in superclass object [deelared type]. c) Generate output for instanceof operator. ) Do object casting (show both implicit and explicit) g) Generate output for constructor chaining fusing this and super keywords] Note: 1) Draw object diagrams wherever possible and necessary to show the state of the objects created Include the below in your project report: The UML diagram of all Classes. Sereenshots of all output generated from the application.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 1 images

Blurred answer
Knowledge Booster
Data members
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.
Recommended textbooks for you
Database System Concepts
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education