Codingassignmenthelper | Home Codingassignmenthelper | Samples

MIS501 T1 2021 Assessment 3 Supplementary Exam May

MIS501

MIS501 T1 2021 Assessment 3 Supplementary Exam May

		Assignment 3
Write a class, Car, that will model the properties or member variables of a Car. It should
store the Car’s:
- model (example: Apollo)
- make (example: Holden)
- year (example: 2021)
- color(example: Red)

1. The constructor should set all four fields, in the order listed above.
2. Write all the accessor (getter or get) methods and mutator (setter or set) methods
for all the member variables. Which means, all interactions with these fields will be
via the following methods:
Model = getModel()
make= getMake()
year = getYear()
color=getColor()

setModel(newModel)
setMake(newMake)
setYear(newYear)
setColor(newColor)

3. While setting year using setYear(newYear). You will update the year only if the
newYear is less than or equal to the current year (2021). Otherwise show a message
to the user as: "Not Updated,You have entered future year."
4. Write a getFuelEfficiency() method/class function that should decide the efficiency
as follows:
- For Make Holden, Model Apollo, Year less than and equal to 2012
Fuel efficiency is 190km/lt
- For Make Holden, Model Apollo, Year greater than 2012
Fuel efficiency is 200km/lt
For Make Holden, Model Apollo , Year less than and equal to 2017
Fuel efficiency is 200km/lt
- For Make Holden, Model Apollo, Year greater than 2017
Fuel efficiency is 250km/lt

For Make Subaru, Model Impreza , Year less than and equal to 2012
Fuel efficiency is 175km/lt
- For Make Subaru, Model Impreza, Year greater than 2012
Fuel efficiency is 195km/lt
For Make Subaru, Model Impreza , Year less than and equal to 2017
Fuel efficiency is 200km/lt
- For Make SUbaru, Model Impreza, Year greater than 2017
Fuel efficiency is 250km/lt
- ‘Fuel efficiency is 120km/lt’ for other models
5. Write a displayFuelEffeciency() method/ class function to display the fuel efficiency
of following models.
Make Subaru, Model Impreza, Year 2018
Make Holden, Model Apollo, Year 1999
Make Subaru, Model Legacy, Year 2020
Make Holden, Model Focus, Year 2021

Instructions:
Note:

You will be using OBS Software to take Assessment 3
Duration 2 hours
Submission Instructions:

1. You need to attempt Assessment 3 using OBS
2. Please start OBS recording before you access the Assessment 3.
3. Once you have started recording then start working on the solution of Assessment
in Anaconda Spyder or any other IDE of your own choice.
4. After completing the Assessment 3 please submit the program as an attachment
in the link provided for Supplementary Assessment 3 on BlackBoard.
5. Then stop the recording
6. Share the recoding on class messages.


		
To Download Click Here > MIS501--T1-2021-Assessment 3 SupplementaryExam-May.pdf
Codingassignmenthelper | Home Codingassignmenthelper | Home