Access over 20 million homework & study documents

Automobile Java Solution

Content type
User Generated
Subject
Programming
Type
Homework
Rating
Showing Page:
1/9

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/9

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/9

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 9 pages?
Access Now
Unformatted Attachment Preview
Pseudo code and flowcharts and finished code for Automobile class Problem: To complete the code given, some of which is valid code and some pseudo code that needs to be fleshed out and clearly commented. Pseudo code: Class TestAutomobiles: Create main method Implement automobile class object 1 and pass 1451, "Chevrolet", "Camaro", "red", 2010, 24.5 as arguments Implement automobile class object 2 and pass 145188, "Ford", "Focus", "white", 2019, 75 as arguments Set all the argument passed to their respective setter Pass each the argument to display method Implement Display method and pass Automobile and string as argument Print all the information End Class Automobile: Declare variable id, make, model, color, year and mpg as private Implement toString () method Return string Implement a constructor Automobile receive the argument from TestAutomobiles Implement setter and getter for id Implement setter and getter for make Implement setter and getter for model Implement setter and getter for color Implement setter and getter for year Implement setter and getter for mpg End Flowchart for Automobile Test class Flowchart for automobile class Finished Code /*** TestAutomobiles*****/ //ensures this test class is in the same package as the class //automobiles test class public class TestAutomobiles { //main method public static void main(String[] args) { //pass arguuments to automobile constructor Automobile auto1 = new Automobile(1451, "Chevrolet", "Camaro", "red", 2010, 24 ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Really useful study material!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Documents