1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
WINSTONCH [101]
3 years ago
14

Given main(), complete the Car class (in file Car.java) with methods to set and get the purchase price of a car (setPurchasePric

e(), getPurchasePrice()), and to output the car's information (printInfo()).
Ex: If the input is:_______.
2011
18000
2018
Computers and Technology
1 answer:
Amiraneli [1.4K]3 years ago
8 0

Answer:

Explanation:

This a java code for a car and can be written as follows:

public class Car {

   private int modelYear;

   private int purchasePrice;

   private int currentValue;

   public int getModelYear() {

       return modelYear;

   }

   public void setModelYear(int modelYear) {

       this.modelYear = modelYear;

   }

   public int getPurchasePrice() {

       return purchasePrice;

   }

   public void setPurchasePrice(int purchasePrice) {

       this.purchasePrice = purchasePrice;

   }

   public int getCurrentValue() {

       return currentValue;

   }

   public void calcCurrentValue(int year) {

       int age = year - modelYear;

       currentValue = (int) Math.round(purchasePrice * Math.pow(0.85, age));

   }

   public void printInfo() {

       System.out.println("Car's information:");

       System.out.println("   Model year: " + modelYear);

       System.out.println("   Purchase price: " + purchasePrice);

       System.out.println("   Current value: " + currentValue);

   }

}

You might be interested in
Use the Windows ________ to check on a nonresponsive program. Select one: A. Backup utility B. Task Manager C. System Restore D.
Nitella [24]
The answer is task manager. You can access it by pressing the Windows key and searching "task manager". You can also press ctrl+alt+delete or ctrl+shift+esc to access it.

Taskanager will show you all the applications currently running and how many resources they are using. If a task is unresponsive, it can be force closed from task manager.
4 0
3 years ago
A flat panel detector’s detector element size determines what?
Nastasia [14]

Answer:

A flat panel detector’s detector element size determines Spatial resolution.

7 0
3 years ago
Which of the following statements is true?
Free_Kalibri [48]
C, <span>Word processing can be used to create databases of information.</span>
7 0
3 years ago
Read 2 more answers
Computer Works is a computer accessories manufacturer based in Brazil. All customers in South America pay the same freight charg
arsen [322]

Answer: Zone

Explanation:

  The zone pricing is refers to the process which establishing a price for the various types of services and products that relying upon where individuals get them.

In the zone pricing process event, if a customer purchases something from the zone A and, at that point something very similar in Zone B, then they need to pay various costs.  

An organization and company need to  use the zone pricing for paying the cost for the transportation. it is also used in organization for the pricing strategies.

4 0
4 years ago
Which of the following is true of Shareable Content Object Reference Model (SCORM)? Group of answer choices guidelines that allo
dalvyx [7]

Answer:

The correct answer to the following question will be Option B (Control how well the e-learning artifacts interact technically with LMS).

Explanation:

SCORM seems to be a compilation of requirements and criteria for commodities used during e-learning. This describes the different ways to communicate here between information or data on the customer side as well as the run-time context.

  • The specification also specifies how to bundle e-learning material for functionality, this is achieved by using the Bundle Exchange Format, an exchangeable ZIP file.
  • It is essentially a manual that informs developers as well as content providers on how to make their apps or programs compliant with several other e-learning apps including applications.

The other three options are not related to the given scenario. So that option B is the right answer.

6 0
3 years ago
Other questions:
  • The logical view Select one: a. shows how data are organized and structured on the storage media. b. presents an entry screen to
    7·1 answer
  • Assume you have the following array: int[] values = new int[15]; What will happen if the following code is executed? int[15] = 2
    12·1 answer
  • The __________ clash of clans and candy crush saga are video games that exploit the real world–digital world convergence by buil
    10·1 answer
  • Do you think an employer can accurately judge an applicant’s skills and character by reviewing his/her job application? Why or w
    14·1 answer
  • Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follo
    13·1 answer
  • You are planning trip to South America and and are worried about your devices with private keys being stolen. So you decide to s
    9·1 answer
  • Write a recursive method called repeat that accepts a string s and an integer n as parameters and that returns s concatenated to
    7·1 answer
  • It is where your cpu (processor) is installed
    10·2 answers
  • Which of the following devices can be connected to a network? Check all of the boxes that apply.
    9·1 answer
  • John is writing a code instructing the character to move forward 10 steps, choose a number between 1 to 10, and if the number is
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!