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
julsineya [31]
3 years ago
12

"Write a class named Car that has the following data attributes:" _ _year_model (for the car’s year model) _ _make (for the make

of the car) _ _speed (for the car’s current speed)
Computers and Technology
1 answer:
UkoKoshka [18]3 years ago
6 0

Answer:

public class Car {

   private String __year_model;

   private String __make;

   private int __speed;

   //Creating the constructor

   public Car(String __year_model, String __make, int __speed) {

       this.__year_model = __year_model;

       this.__make = __make;

       this.__speed = __speed;

   }

   //Creatining the set and get methods

   public String get__year_model() {

       return __year_model;

   }

   public void set__year_model(String __year_model) {

       this.__year_model = __year_model;

   }

   public String get__make() {

       return __make;

   }

   public void set__make(String __make) {

       this.__make = __make;

   }

   public int get__speed() {

       return __speed;

   }

   public void set__speed(int __speed) {

       this.__speed = __speed;

   }

}

Explanation:

As stated in the question, The class Car is created using Java programming language with the three attributes year_model, make and speed.

Constructors as well as set and get methods were also created for each of the fields.

You might be interested in
What is a database query?
lana [24]
C.a form used to create a new tables for the database
8 0
2 years ago
Read 2 more answers
What did Bill Gates invent?
Viktor [21]
He invented microsoft.
8 0
3 years ago
Read 2 more answers
What language(s) must be used to display a bare-minimum web page?
Reil [10]

Answer: Hyper Text Markup Language (HTML)

Explanation:  

Computers use language to communicate, just like people do and the way that computers communicate with the internet is through a language that is called Hyper Text Markup Language/ HTML

Hyper Text is the process of linking objects to each other, so that when one object is clicked the linking object can be viewed. Hyper Text Markup Language was created by Tim burners in 1990


8 0
3 years ago
Read 2 more answers
You right-click a Server Core server in Server Manager and click Computer Management. You see an error indicating that the serve
Anarel [89]

Answer:

Configure Windows Firewall on the remote computer.

Explanation:

3 0
3 years ago
Given a floating-point variable fraction, write a statement that writes the value of fraction to standard output. Do not write a
sertanlavr [38]

Answer:

The statement to this question is "cout << fraction;".

Explanation:

In the given question it is declared, that a floating-point variable "fraction" is defined, which holds some value. To print this variable value in C++ program we use the print function, which is "cout". This function also used to print messages and values, in this question the print function uses the float variable "fraction", which prints variable value.

8 0
3 years ago
Other questions:
  • Which of the following is something that scientists often seek by using computer models and simulations?
    8·2 answers
  • A properYour customer has connected a 1000-watt microwave oven and a 600-watt mixer to a 15-amp branch service line for the kitc
    11·2 answers
  • in cell h5, enter a formula that will calculate the percentage of attendees that went to the Altamonte springs job fair in 2018.
    15·2 answers
  • Which principle of animation deals with imparting a unique identity to the animated character?
    5·1 answer
  • what is created when the movement of light is blocked by an object and cannot pass through the other side?
    13·2 answers
  • Develop a list of privacy protection features that should be present if a website is serious about protecting privacy. Then, vis
    8·1 answer
  • ____ is the process of drawing a series of increasingly detailed DFDs, until all functional primitives are identified.
    7·1 answer
  • George enters the types of gases and the amount of gases emitted in two columns of an Excel sheet. Based on this data he creates
    6·1 answer
  • Most 4 year colleges want an applicant's scores for all the following except
    12·1 answer
  • Lasses give programmers the ability to define their own types. <br><br> a. True<br> b. False
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!