Question: SWENG 3 1 1 / CMPSC 2 2 1 Object - Oriented Design Lab 6 : Abstract Classes and Polymorphism Objectives: Practice programming using Object
SWENGCMPSC ObjectOriented Design
Lab : Abstract Classes and Polymorphism
Objectives:
Practice programming using Object Oriented design using Abstract classes and polymorphic design.
Instructions:
You are allowed to use IDE to solve this lab.
Write a Java program that solves the following problem, this is a ReDesign from Lab where you will need to follow the correct objectoriented design principles.
Answer the following questions as part of your pseudocode section.
a Use Abstract Classes and Methods in your design.
i Which Classes you will convert to abstract
ii Which methods if any should be abstract from that class?
b Utilize Polymorphic Design Principles.
i Which parts and what changes would you make to utilize polymorphic design principles?
Requirements:
All your classescode Must be written in a single file called Labjava
In the main function,
Main function: Demo your code with
Car Objects. Objects from each car type.
One Dealership car Object.
Utilize all dealership methods.
Except the getters and setters, you are free to use or not. Whatever way you see fit
The following are the technical requirements for each class you will develop.
Dealership:
Must have at least one constructor.
A method to updatechange each attribute in the class.
ONE method to count the number for each car type Electric Gas and Dieselin the dealership lot.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
