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
5. The coordinates of triangle ABC are A(-7, 3), B(3, -7) and C(8. 8)
kati45 [8]

Answer:

b

Explanation:

6 0
3 years ago
Read 2 more answers
What are the programs in a computer​
stealth61 [152]

Answer:

Computer skills examples

Operating systems  

Office suites  

Presentation software

Spreadsheets  

Accounting software

Explanation:

A program is a set of ordered operations for a computer to do in computing. The program in the modern computer described by John von Neumann in 1945 has a one-at-a-time series of instructions that the computer follows. Typically, the application is saved in a computer-accessible storage location.

4 0
3 years ago
Yuki is preparing to write a research paper for his history class. Which style guide would be best for him to use?
FromTheMoon [43]
The answer is Modern Language Association (MLA).  Yuki is preparing to write a research paper for his history class. The style guide that would be best for him to use is Modern Language Association (MLA).  <span>MLA style is a system for documenting sources in scholarly writing.  it has been widely used for classroom instruction and used worldwide by scholars, journal publishers, academic and commercial presses.</span>
3 0
3 years ago
Read 2 more answers
Crisp-DM is an open standard process model that contains stages
Feliz [49]

Answer:

Yes, Cross Industry Standard Process for Data Mining has six stages. Business understanding, data understanding, data preparation, modeling, evaluation, and deployment.

Explanation:

3 0
2 years ago
Read 2 more answers
Someone hacked into an employees computer and erased all of their data. All data for the past three weeks was lost as that was w
ANEK [815]

Answer:

B. client server

Explanation:

Someone hacked into an employees computer and erased all of their data. The employee had last performed a backup three weeks back. This means that there is a backup server in the company. In other words, the network architecture is of the form client-server where data from the employee computers is backed up to a centralized repository from where content could be restored. Hence option B represents the most likely choice.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Assume that an int variable age has been given a value. Assume further that the user has just been presented with the following
    14·1 answer
  • True False The explicit location always tells you where users are located when they type the query.
    10·2 answers
  • You listened to a song on your computer. did you use hardware or software? explain.
    15·1 answer
  • Individuals who require better speed and performance for graphics-intensive applications (e.g., video editing, gaming, etc.) pre
    8·1 answer
  • How to calculate least count of a stopwatch
    8·1 answer
  • How is an interpreter different from a compiler?
    9·2 answers
  • What is 4x+2x(-3-3) thanku
    11·2 answers
  • If String str = "Computer Science";, then what is the value of str.substring(10);? ​
    6·1 answer
  • What are the 3 dimension of an information system?
    13·1 answer
  • unlike the barcode-based tracking system, a radio frequency identification system offers a .
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!