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
which classification of money describes money that can be accessed quickly and easily, and includes coins and paper money as wel
zhenek [66]

Money that can be promptly and easily appraised falls under the M1 Money classification.

<h3>What are broad and narrow money, respectively?</h3>

Broad money typically refers to M2, M3, and/or M4. The most liquid kinds of money, such as currency (banknotes and coins), as well as bank account balances that may be instantly changed into currency or used for cashless transactions, are generally referred to as "narrow money" (overnight deposits, checking accounts).

<h3>Describe Narrow Money.</h3>

All of the actual money that the central bank has falls under the category of "narrow money," which is a subset of the money supply. Demand deposits, money, and other liquid assets are included. In the US, "narrow money" is referred to as M1 (M0 plus demand accounts).

To know more about Money classification visit:-

brainly.com/question/28095328

#SPJ1

5 0
1 year ago
What is an assembler?
Flauer [41]

an assembler is a program that converts code written in a high-level language to assembly language that the computer processor can execute.

4 0
3 years ago
Using the FAFSA form , you can for apply for what
AlladinOne [14]

apply for financial aid for college or grad school.

7 0
3 years ago
Read 2 more answers
, , ,g d,t ,dt m,dt ymtd
maks197457 [2]

Answer:ummm me confused

Explanation:

4 0
3 years ago
Round 74,361 to the nearest 10​
grandymaker [24]

Answer:

74,400 i think

Explanation:

8 0
3 years ago
Other questions:
  • true /falseCompression of entries in the term-document matrix can be used to reduce run-time storage and execution-time requirem
    10·1 answer
  • Jason is computer professional who has access to sensitive information. He shares this information with another organization in
    8·1 answer
  • 7. What is the school campus’s setting<br> the school is sanford
    6·2 answers
  • Your browsing the Internet and realize your browser is not responding which of the following will allow you to immediately exit
    14·2 answers
  • In 1-2 pages, identify a social networking technology and identify at least 10 security and/or privacy risks the technology has
    8·1 answer
  • Tweaking existing technology in a new way is usually called _____. leveraged creativity state-of-the-art breakthrough applicatio
    5·1 answer
  • What is the lowest layer of the OSI model at which LANs and WANs support the same protocols?
    5·1 answer
  • Gold jewellery is made when solid-gold is melted and then put into containers which are the shape of the jewellery. After this t
    9·1 answer
  • A security administrator plans to conduct a vulnerability scan on the network to determine if system applications are up to date
    15·1 answer
  • What represents a user’s specific preferences?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!