Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

- Updated par Mino subiect - 52016293728X b Answered: 6201 2020L palX d-133995-or-content-rid-649769_1/courses/TTOR210450H_20FL_10/Project%20Work%20-%20Updated pdf Part-2 (Encapsulation, Inheritance, Polymorphism) Create a Java project that demonstrates various

image text in transcribed
- Updated par Mino subiect - 52016293728X b Answered: 6201 2020L palX d-133995-or-content-rid-649769_1/courses/TTOR210450H_20FL_10/Project%20Work%20-%20Updated pdf 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 properties/functionalities: a) Create a total of 3 member variables for the class, selecting the appropriate data types for each field b) Include an argument constructor in this Class, that will initialize all data fields. c) Encapsulate this Class The two subclasses will have below properties/functionalities 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 subclasses d) You should include overlonded methods in any of the classes you have created (superclass or subclass), e) Override the toString() method in each of your Classes :) Override the equals() method in each of your Classes The test class with the main () method will perform below tasks: a) Create objects of superclass and each 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) e) 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 distams 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. ITDA2104-Pro Fall 2020 on QON

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

Students also viewed these Databases questions

Question

3 How the market system answers four fundamental questions.

Answered: 1 week ago