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
We assume that ABC Corporation has two business offices. These offices are in the cities of Orlando and Miami. These cities are
murzikaleks [220]

Answer:

The following are the answer to the given points:

Explanation:

In point (a):

Calculating the long-distance call cost:

= 4 \times 5 \times 0.40 \\= 20 \times 0.40\\= 8

Calculating the local call cost:

= 10 \times 3  \times 0.05\\ = 30 \times 0.05\\= 1.5

Calculating the overall cost of PSTN:

= 25 + (4 \times 5 \times 0.40) + (10 \times 3 \times 0.05) + 2000 + 275 \\= 25 + 8 + 1.5 + 2000 + 275 \\=   2309.5

In point (b):

Calculating the call rate per second and the average arrival rate:

\to (\lambda) = 0.2

The call average length:

\to (T_s) = - 8  \\\\ = (8  \times 60) \ seconds \\\\ = 480 \ seconds  

The complete agent number:

\to  (m) = 9

The strength of traffic:

\to u = \lambda \times  T_s  \\\\  =   (0.2  \times 480) \\\\ = 96    

The occupancy of the agent:

\to  p = \frac{u}{m}  \\\\

      = \frac{96}{9}  \\ \\= 10.66  

Calculation of obtained:

= \frac{(\frac{um}{m!})}{(\frac{um}{m!})} + (1-p) \sum {m-1} _{k=0}  \ \frac{uk}{k!}

We get = 0.329 to substitute values.  

In point (c):

The rate of blocking = 5 \%

average call time (T_s) = 480 \ seconds

                                    = 0.05 \times  480 \ seconds \\  = 24 \ second

In point (d):

Calculating the number of link, which is required:  

= \frac{275}{5} \\\\ =55

In point (e):

Calculating the Line Number:

= \frac{275}{5} \\\\ =55

PSTN line number:

=  (\frac{2000}{55}) \\\\ = 36.3636\\\\= 37

In point (f):

The gross design expense = $ 2309. 5

5 0
4 years ago
Type the correct answer in the box. Spell all words correctly.
Ugo [173]

Answer:

Business format franchise or Business Brokers

Explanation:

8 0
3 years ago
On a system with paging, a process cannot access memory that it does not own. Why? How could the operating system allow access t
kompoz [17]

Answer:

  • Because the page is not in its page table
  • The operating system could allow access to other memory by allowing entries for non-process memory to be added to the process page table

Explanation:

On a system with paging, a process cannot access memory that it does not own because the page is not in its page table also the operating system controls the contents of the table,therefore it limits a process of accessing to only the physical pages allocated to the process.

The operating system could allow access to other memory by allowing entries for non-process memory to be added to the process page table.that way two processes that needs to exchange  data can efficiently do that . i.e creating a very efficient inter-process communication

7 0
3 years ago
What are some of the strategies that you use for confronting a complex problem and breaking it down into smaller pieces? How mig
bazaltina [42]

Answer:

Breaking it down I guess for me, you could take down all the possible things that you could do. Eliminating things, one by one. It could help working on a computer by not letting yourself get over-whelmed by all your programming and thinking "alright, this THEN this."

Explanation:

8 0
3 years ago
A computer which links several pcs together in a network is called
Nadusha1986 [10]
Is it called a, "server".
8 0
4 years ago
Other questions:
  • Which of the following has likely attended vocational school?
    10·1 answer
  • The narrative structure of the popular movies can be broken down into
    15·1 answer
  • Write a multi-paragraph Informational essay about a current event in the news. You can develop your topic using
    8·2 answers
  • - The concept of communication competence suggests there is no single "ideal" or "effective" way to communicate in every situati
    6·2 answers
  • One factor in algorithm performance that we've not had a chance to speak much about this quarter, but one that is certainly rele
    6·1 answer
  • Can you get in trouble for copying something you thought you were allowed too reddit?
    9·1 answer
  • REM Its an exam program
    12·1 answer
  • What other jobs would require employees to follow directions very carefully? (Give 4 examples)​
    9·1 answer
  • We can save our data peremently on a
    7·2 answers
  • Complete the sentence.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!