INFO6066: Specifications for Vehicle Class - IT Assignment Help

Download Solution Order New Solution
Assignment Task:

Task:

In this question you will be writing a super class and two sub classes and then writing a test class that will demonstrate polymorphic behavior. 

NOTE: 2 marks of the 25 are allocated for “Style and Following Directions”. All classes must have a documentation header. Utility (non-getter/setter) methods must have a full method documentation header.

“All classes must compile or a mark of 0 will be assigned”

Specifications for Vehicle Class (5 Marks)

 

- type: String
- make: String

- model: String
______________________________________________________________
+Vehicle(String: type)

+Vehicle( String: type, String: make, String: model)

+getType(): String

+getMake(): String

+getModel(): String

+setMake(String: make): void
+setModel( String: model):void
+describeVehicle( ): String
+rateQuality: String
+toString(): String

 

Vehicle

Examine the UML diagram for the super class Vehicle that is shown below. This diagram shows what data variables and what methods will be found within the class. Using the information from the diagram write the code for the super class. NOTE: do not include any data members or methods in any class that are not in the UML diagram.



















 

 

Details:

For the one argument constructor set the default values for make and model to “unknown”.

The describeVehicle( ) method and rateQuality( ) method will be abstract and will be over-ridden in the sub classes.
For the toString( ) method, have the method return a String that reads  “This Vehicle is a (type_goes_here).  Its make is (make goes_here), and it’s model is(model goes here).

The Sub Class Bicycle.java (5 marks)

 

Extend the super class Vehicle to make a sub-class called Bicycle.java.

 

-bicycleType: String 
-rating: int

______________________________________________________________
+Bicycle(String: bType)
+Bicycle(String: bType, String: make, String: model, int rating)

+getBicycleType(): String

+getRating(): int
+setBicycleType(String: bType):void

+setRating(int: rating): void
+describeVehicle(): String

+rateQuality( ):String

+toString( ): String

Bicycle









 

 

 


 

 

 

 


 

 

Details:


For the one argument constructor, you will call the one argument parent constructor and pass in the type.  The rating will be set at 1. 

When creating a bicycle utilizing the four-argument constructor you will call the three argument parent constructor, passing in the type, make, and model.

You need to implement the abstract method describeVehicle( ) in this sub class. You will then describe in your own words what a bicycle actually is.

The rateQuality method will rate the bicyle on a numeric scale.   If the rating is 2 or less your method will return a statement that the bicycle is of poor quality.  If the rating is 3-5 then the statement would read the bicycle is of moderate quality. From 6-8 it is of good quality.  Anything above an 8 should state that the bicycle is of excellent quality. 

Example( if the bicycle has a rating of  4 “This bicycle has been determined to be of moderate quality.”

For the toString( ) method of the Bicycle class, have the method make a call to the super class toString( ) method, and then concatenate onto the string from the super class this string:

“This (bicycleType) has a rating of (rating)”.

 

 


This INFO6066  IT Assignment has been solved by our IT Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment Experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.