Create an automobile class for a dealership

Assignment Help JAVA Programming
Reference no: EM132074137

This activity will enable you to apply what you will learn during this course.

You need to write a program for the instructions given below:

Create an Automobile class for a dealership. Include fields for an ID number, make, model, color, year, vin number, miles per gallon, and speed. Include get and set methods for each field. Do not allow the ID to be negative or more than 9999; if it is, set the ID to 0. Do not allow the year to be earlier than 2000 or later than 2017; if it is, set the year to 0. Do not allow the miles per gallon to be less than 10 or more than 60; if it is, set the miles per gallon to 0. Car speed should be initialized as 0. Include a constructor that accepts arguments for each field value and uses the set methods to assign the values. Also write two methods, Accelerate () and Brake (). Whenever Accelerate () is called, increase the speed by 5, and whenever Brake () is called, decrease the speed by 5. To allow users to specify the speed to increase (or decrease), create two overloading methods for Accelerate () and Brake () that accept a single parameter specifying the increasing (or decreasing) speed. Write an application that declares several Automobile objects and demonstrates that all the methods work correctly. Save the files as Automobile.java and TestAutomobiles.java.

Please submit the source code for your program along with a word document that includes screen shots of the compiled results and executed output. The page margins on the top, bottom, left side, and right side should be 1 inch each.

Verified Expert

This is basic level java programme which introduces the concept of OOPs (object oriented programing) via Class concept. We have created an automobile class with ID number, make, model, color, year, VIN number, miles per gallon, and speed as Class variable and Accelerate () & Brake () as class methods. We have also used the concept of function overloading, setter & getter concept. A tester class were created to test the working the Automobile java class.

Reference no: EM132074137

Questions Cloud

Some statisticians prefer complex models : Some statisticians prefer complex models, models that try to fit the data as closely as one can. Others prefer a simple model.
How drug policies affect joes circumstances : Joe is a 34-year-old, Caucasian male who came to the County Division of Social Services to apply for General Assistance (GA) benefits.
How much will you pay for the company stock today : If you require an 9.80 percent return on your investment, how much will you pay for the company's stock today?
Availability of air travel makes : "Here's a good option for us, Spencer," remarked Tasha. "This school has tuition and fees which are much lower than the national average."
Create an automobile class for a dealership : IT210 M4A1 Programming Assignment - program along with a word document that includes screen shots of the compiled results and executed output
How many of each type of scooter must scotty scooters sell : Scotty's Scooters plans to sell a standard scooter for $40 and a chrome scooter for $50. How many of each type of scooter must Scotty's Scooters sell
What does the confidence level mean : "What does the confidence level mean?" asked Tasha.
Define what it means to you to engage with diversity : Explain how this experience influenced your perceptions of diversity and difference. Describe the cultural event in which you participated.
Calculate the company fixed costs : The unit contribution margin is $10 and the break-even point in unit sales is 16,500. The company's fixed costs are

Reviews

inf2074137

11/15/2018 11:03:13 PM

This site is very co-operative. The expert did awesome job here for my online assignment. I was very much tensed about this assignment and finally got the experts help to complete my task. It was good to discuss with the expert and he replied on all of my queries perfectly on time. thanks I have gained confidence in you guys.

len2074137

8/2/2018 9:58:57 PM

Please submit the source code for your program along with a word document that includes screen shots of the compiled results and executed output. Submit the source code along with the Word document to the appropriate dropbox

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd