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
OlgaM077 [116]
3 years ago
8

Define a constructor as indicated. Sample output for below program:Year: 0, VIN: -1Year: 2009, VIN: 444555666// ===== Code from

file CarRecord.java =====public class CarRecord {private int yearMade;private int vehicleIdNum;public void setYearMade(int originalYear) {yearMade = originalYear;return;}public void setVehicleIdNum(int vehIdNum) {vehicleIdNum = vehIdNum;return;}public void print() {System.out.println("Year: " + yearMade + ", VIN: " + vehicleIdNum);return;}// FIXME: Write constructor, initialize year to 0, vehicle ID num to -1./* Your solution goes here */}// ===== end ===== //===== Code from file CallCarRecord.java =====public class CallCarRecord {public static void main (String args) {CarRecord familyCar = new CarRecord();familyCar.print();familyCar.setYearMade(2009);familyCar.setVehicleIdNum(444555666);familyCar.print();return;}}// ===== end =====
Computers and Technology
1 answer:
Keith_Richards [23]3 years ago
4 0

Answer:

public CarRecord(){

       yearMade = 0;

       vehicleIdNum = -1;

   }

Explanation:

A constructor is used to initialize an object instantly. It does not have a return type and has the same name as class.

Create a constructor and set the year as 0 and vehicleIdNum as -1.

This constructor is the default constructor, initializes the default values for the variables, for this class.

You might be interested in
What concept or principle requires layered, complementary controls sufficient to detect and deter infiltration and exploitation
Alekssandra [29.7K]

Answer:

security In-depth

Explanation:

The security in depth is a principle in which a sequence of safeguarding channels is used to secure the important data and information i.e valuation to the company. It also increased the security for a company as a whole

Therefore in the given situation, the  security In-depth required to layered the safeguarding channels to detect the infiltration

Hence, the  security In-depth is the correct answer

4 0
3 years ago
What is cloud based LinkedIn Automation?
Zielflug [23.3K]

Answer:

The cloud-based LinkedIn automation tool makes life easier for you by automating functions like sending connection requests, liking and commenting on posts, sending customized messages, and much more.

6 0
3 years ago
Read 2 more answers
Which type of communication protocol converts data into standard formats that can be used by applications?
larisa86 [58]
<span>Arrival protocols are the type of data protocols that convert data into standard formats that can be used by applications, such as email, Web browsers and Skype</span>
8 0
3 years ago
Un comerciante de régimen código para comprar mercancías gravadas a un comerciante de régimen simplificado precio de venta al pú
Genrish500 [490]

Answer:

El valor sin impuestos de las mercancías era de $1.512.605.

Explanation:

Dado que un comerciante de régimen código para comprar mercancías gravadas a un comerciante de régimen simplificado pagó un precio de venta al público 1.800.000 incluido el IVA tarifa general (19%), para determinar el valor de las mercancías sin el impuesto incluido se debe realizar el siguiente cálculo:

1.19 = 1.800.000

1 = X

1.800.000 / 1.19 = X

1.512.605 = X

Por lo tanto, el valor sin impuestos de las mercancías era de $1.512.605.

5 0
3 years ago
To insert an endnote, which steps should you follow?
Evgesh-ka [11]
<span>To insert an endnote, you should follow he following steps:
A.Place the cursor in the document where you want the note reference mark to appear, select Insert Endnote command from the Reference tab in the Footnotes group.
Correct answer: A
</span><span>This way a reference mark would be added in the text and the endnote will be added at the end of the document.</span>
6 0
3 years ago
Other questions:
  • Which of the following expansion ports would be used to enable transfer of power, data, and video to peripheral devices on an Ap
    7·1 answer
  • If you specify a user without specifying a hostname, mysql will
    13·1 answer
  • 2. Billys teacher asked him to type a report about asian food. Which paragraph format should he use?
    12·2 answers
  • Integration Management, one of the 10 PMBOK Guide Knowledge Areas, represents the processes and activities to identify, define,
    12·1 answer
  • Which table attributes would this code produce?
    15·1 answer
  • Worksheet Identify the devices for moving the cursor around your computer screen
    12·1 answer
  • Mention 3 components that can be found at the back and front of the system unit​
    6·1 answer
  • True false.
    10·2 answers
  • What are the different alignment options available in Microsoft​
    11·2 answers
  • If u play codm pls tell me ur username
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!