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
murzikaleks [220]
4 years ago
10

* Declare a variable called "race" of type "Race", andinitialise its value to a new instance of the "Race" class. The"Race" cons

tructor requires two parameters. The first shouldbe a new instance of the "Track" class, and the second shouldbe the car that you previously created.
Computers and Technology
1 answer:
goldfiish [28.3K]4 years ago
4 0

Answer:

Race race = new Race(track, car);

Explanation:

Complete code fragment is as follows:

Track track = new Track();

Car car = mycar;

Race race = new Race(track,car);

Here we are declaring a variable race of the type Race  which is initialized to new instance of Race class. The constructor of race takes up the following 2 arguments:

1) New Instance of Track class;

2) Previously defined reference to an object of type Car.

You might be interested in
Write a C++ program to exchange values of two variables using function exchange().
Shkiper50 [21]

Answer:

#include<iostream>

using namespace std;

//create the exchange function

void exchange(int a, int b){

   int temp;  //initialize temporary

   //swap the variables value

   temp=a;

   a=b;

   b=temp;

   //print the output after exchange

   cout<<"a is: "<<a<<endl;

   cout<<"b is: "<<b<<endl;

}

//main function program start from here

int main(){

  //initialization

  int a=3, b=6;

  exchange(a,b);  //calling the function

  return 0;

}

Explanation:

Create the function exchange with two integer parameter which takes the value from the calling function.

and then declare the third variable temp with is used for swapping the value between two variables.

first store the value of 'a' in the temp and then assign the 'b' value to 'a' and then, assign the temp value to b.

for example;

a=2, b=9

temp=2;

a=9;

b=2;

So, the values are swap.  

and then print the swap values.

Create the main function and define the input a and b with values.

Then, calling the exchange function with two arguments.

6 0
3 years ago
You are going to create an Arduino sketch where you have two push buttons, one piezo, one
Elanso [62]

Answer:

asw

Explanation:

4 0
3 years ago
Which teamwork characteristic motivates your team members to perform better?
scoundrel [369]
Maybe Encouragement? I don't know, are there any choices to choose from?
4 0
3 years ago
Read 2 more answers
What does D'Artagnan discover about Milady? d. That she has the mark of a criminal, the fleur- c. That she is secretly working f
Setler79 [48]
The answers is b .....
6 0
3 years ago
Read 2 more answers
When nearly all Americans in a recent survey said that they believe executives base decisions primarily on what will advance the
dlinn [17]

Answer:

serious concerns about.

Explanation:

Since the reports are indicating the almost all the Americans believe executive based decisions and it is a serious concern because the people should be taking their own decisions and the career decisions are the most important ones in a person's life. Depending on other to take decisions for you shows a weak character and lack of self-confidence.

6 0
3 years ago
Other questions:
  • What quadrants in the johari window need to shrink in order for us to gain greater self-awareness?
    5·1 answer
  • Your program is going to compare the distinct salaries of two individuals for the last 5 years. If the salary for the two indivi
    15·1 answer
  • Use the ______ attribute to configure the browser to render default table and table cell borders.
    12·1 answer
  • Xavier would like to change the sort options for his contacts. In which tab will he find the Arrangement command group?
    6·1 answer
  • HELP!!! Bad things about Helen Keller. I'm doing a debate and i need to prove that Steve Jobs is better than Helen Keller!!
    14·1 answer
  • In order to place a gradient within a stroked path for type, one must convert the type using the __________
    15·1 answer
  • URGENT: I need to add a while loop in this program but I don't know-how. I am also having trouble neatening some lines of code.
    15·1 answer
  • Which of the following are pointers?
    9·1 answer
  • Cho 1 biến x thuộc kiểu dữ liệu Integer , hãy cho biết biến x dùng để làm gì?
    7·1 answer
  • How many people did you help today
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!