How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Scott Your Own Question
Scott
Scott, MIT Graduate
Category: Homework
Satisfied Customers: 3040
Experience:  MIT Graduate (Math, Programming, Science, and Music)
3546829
Type Your Homework Question Here...
Scott is online now
A new question is answered every 9 seconds

Ss, Write a class named Car that has the following fields: •

Customer Question

ss
JA: The Tutor can help you get an A on your homework or ace your next test. Tell me more about what you need help with so we can help you best.
Customer: Write a class named Car that has the following fields:
• yearModel. The yearModel field is an int that holds the car’s year model.
• make. The make field references a String object that holds the make of the car.
• speed. The speed field is an int that holds the car’s current speed.
JA: Is there anything else the Tutor should be aware of?
Customer: it should be in UML diagram
Submitted: 1 month ago.
Category: Homework
Expert:  LogicPro replied 1 month ago.

Hi

Welcome here.

My name is ***** ***** I will help you.

What is the deadline?

Expert:  LogicPro replied 1 month ago.

Are you there my friend?

Customer: replied 1 month ago.
Yeah , I'm here waiting for that answer :)
Expert:  LogicPro replied 1 month ago.

Great. I need more information before i write it for you

is it in Java or C++?

Also can you provide full assignment text again? Looks truncated.

Customer: replied 1 month ago.
The deadline is sept/16/2017 .
Which's in two days.
Expert:  LogicPro replied 1 month ago.

Thanks

is it in Java or C++?

Also can you provide full assignment text again? Looks truncated.

Customer: replied 1 month ago.
It's java .
Expert:  LogicPro replied 1 month ago.

So you need java and UML diagram in a document?

Also can you provide full assignment text again? Looks truncated.

Customer: replied 1 month ago.
Okay just a minute, I will send you the full assignment.
Expert:  LogicPro replied 1 month ago.

Thanks. I am waiting

Expert:  LogicPro replied 1 month ago.

You can just copy paste again here as a reply if possible

Customer: replied 1 month ago.
2. Car Class
Write a class named Car that has the following fields:
• yearModel. The yearModel field is an int that holds the car’s year model.
• make. The make field references a String object that holds the make of the car.
• speed. The speed field is an int that holds the car’s current speed.
In addition, the class should have the following constructor and other methods.
• Constructor. The constructor should accept the car’s year model and make as arguments.
These values should be assigned to the object’s yearModel and make fields. The
constructor should also assign 0 to the speed field.
• Accessors. Appropriate accessor methods should get the values stored in an object’s
yearModel, make, and speed fields.
• accelerate. The accelerate method should add 5 to the speed field each time it is called.
• brake. The brake method should subtract 5 from the speed field each time it is called.
Demonstrate the class in a program that creates a Car object, and then calls the accelerate
method five times. After each call to the accelerate method, get the current speed of the car
and display it. Then call the brake method five times. After each call to the brake method,
get the current speed of the car and display it.
Expert:  LogicPro replied 1 month ago.

Great. Please wait

Customer: replied 1 month ago.
Ok, in my way to work , i will check up with u later. thanks
Expert:  LogicPro replied 1 month ago.

Sure. Reply me once you are back and available