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
Gekata [30.6K]
3 years ago
12

Design a class named Car that has the following fields:

Computers and Technology
1 answer:
Archy [21]3 years ago
3 0

Answer:

public  class Car {

   private int yearModel;

   private String make;

   private int speed;

   

   public Car(){

       yearModel = 2000;

       make = "Nissan";

       speed = 4;

   }

   

   public Car(int yearModel, String make, int speed) {

       this.yearModel = yearModel;

       this.make = make;

       this.speed =speed;

   }

   

   public void setYearModel(int yearModel){

       this.yearModel = yearModel;

   }

   public void setMake(String make){

       this.make = make;

   }

   public void setSpeed(int speed){

       this.speed = speed;

   }

   

   public int getYearModel(){ return yearModel; }

   public String getMake(){ return make; }

   public int getSpeed(){ return speed; }

   

   public String toString(){

       return "Car's year model: " + getYearModel() + ", make: " + getMake() + ", speed: " + getSpeed();

   }

}

Explanation:

<em>Variables</em> are declared.

<em>No-arg constructor</em> is created with default values.

<em>A constructor with parameters</em> is created.

The required <em>set methods</em> and <em>get methods</em> are created.

<em>toString</em> method is created to return car's specifications.

You might be interested in
Which media player is designed to transfer media to an iOS device?
zubka84 [21]
C. Itunes.
In Apple devices, the iTunes if the only application may it be Windows or OSX operating system iTunes is the only official app registered by apple to stream via cable or wifi to the devices like iPhone, iPad and other Apple devices.

A. Streaming
Slightly the same with downloading but stream makes it self available as it download its content over the internet.
8 0
4 years ago
When Kristy recently started a photography business, she downloaded Photoshop to her computer to edit her photos. She notices he
Alika [10]

Answer:

Computer Properties

Explanation:

When the computer is turned on. Go to Windows Explorer (or CTRL+E).

Right click on "My Computer" or "My PC" (depending on the version of Windows you have installed).

From the list, select "Properties", which is usually the last on the list; you will see the size of the RAM installed on your PC.

Good luck

5 0
3 years ago
Where is the os stored on a smartphone?
Digiron [165]

The OS (Operating System) is stored in the ROM on a smartphone. Correct answer: C

ROM stands for Read Only Memory. It is a computer memory that does not require power to store it's data (non-volitile).  It's the Internal Memory where the OS is stored. It is partitioned into two parts, one for the OS and the rest for apps to use.

6 0
3 years ago
Select the correct answer. Which is an example of noisy data in data sources? A. Age: 987 B. Gender: Male C. First Name: Gary D.
umka21 [38]

Answer:

A. Age 987 is the noisy data

Explanation:

Undoubtedly, this one is, as it is going to create a buzz in each person ear, who is going to listen it.  This age is almost impossible. However, some Monks from Tibet have been able to live for so long however! And this makes my answer a noisy data, as many will not believe on first read. Something which is rare, is the noisy data. And when it is proved and accepted, it becomes a noisy information.

7 0
3 years ago
What happens by default when you copy a formula from one cell to another cell?
natta225 [31]
By default, all cell references are relative references. When copiedacross multiple cells, they change based on the relative position of rows and columns. For example, if you copy the formula =A1+B1 from row 1 to row 2, the formula will become =A2+B2.
8 0
3 years ago
Other questions:
  • If you have an application that is not responding and you want to force it to shut down, whichsystem utility can you use?
    8·1 answer
  • A(n)___ is divided into rows and columns.<br> What goes in the blank?
    7·1 answer
  • What type of scientists studies tree rings to determine the history of an area?
    9·2 answers
  • What are pixels that are the exact same between multiple friends called
    13·1 answer
  • The concept of the internet was developed by the u.s. department of defense as a network that ________ in event of an attack.
    8·1 answer
  • When you click the Decrease Font Size button, Excel assigns the next highest font size in the Font Size gallery.
    8·1 answer
  • Is this right? I’m not sure
    15·1 answer
  • What are the examples of debugging?​
    14·1 answer
  • HEPME <br> ZOOM<br> IN <br> STOP<br> GIVIJG<br> ME <br> LINKS <br> !!
    9·1 answer
  • write the implementation (.cpp file) of the gastank class of the previous exercise. the full specifiction of the class is:
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!