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

  Achieving simplicity and merely being simplistic

What is the difference between achieving simplicity and merely being simplistic?

  List each message and its corresponding operation

List each message and its corresponding operation. Which of these operations triggers a subsequent message? List any such operation and its subsequent message.

  Write a java program the displays the state bird and flower

Write a Java program the displays the State bird and flower. You should use your IDE for this exercise. The program should prompt the user to enter a State and print both the State bird and flower.

  Write a class that reads a file

In java, write a class that reads a file and outputs a list of the unique words in the file and the number of times each unique word occurs.Hint: use a HashMap with keys being the words and values being integer counts associated with the words.

  Create a japplet

Create a JApplet that contains a JLabel and JButton. You'll create a JButton that will automatically change font typeface, style, and size when clicked by the user.

  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!.

  Java program ask user to enter 10-character telephone number

Write a Java program that asks the user to enter a 10-character telephone number in the format XXX-XXX-XXXX. The program should display the telephone number with any alphabetic characters

  Design an algorithm that creates the table c

Design an algorithm that creates the table C according to the above description and has time complexity Theta(m^2).In response give either pseudocode or the description of the steps of the algorithm, and justify the time complexity.

  Creates a file called "grades.txt" with 1000 lines

Write a program that creates a file called "grades.txt" with 1000 lines. Each line in the "grades.txt" file will consist of a student's first name, last name, graduating year(2013,2014,2015), and grade. the student's first name and last name for t..

  Translates a number into the closest letter grade

Write a program that translates a number into the closest letter grade. For case, the number 2.8 which might have been the average of several grades would be converted to B-

  Design programs that communicate with web servers

Design programs that communicate with Web servers and server-side applications through the Hypertext Transfer Protocol (HTTP). Design Java programs that use the Structured Query Language to query and update relational databases. Describe the Java Ser..

  Cascading style sheet to a website

Compare and contrast the process of adding JavaScript and a Cascading Style Sheet to a Website. Determine if they can be used simultaneously in a page.

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