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
Complete the function ending_time that determines the final clock time after a task has been completed. The function takes three
Ivanshal [37]

Answer:

  1. def ending_time(hour, minutes, seconds, work_time):
  2.    if((seconds + work_time) // 60 > 0):
  3.        minutes = minutes + (seconds + work_time) // 60
  4.        seconds = (seconds + work_time) % 60    
  5.        if(minutes // 60 > 0):
  6.            hour = hour + (minutes // 60)
  7.            minutes = minutes % 60
  8.    else:
  9.        seconds = seconds + work_time  
  10.    return str(hour) + ":" + str(minutes) + ":" + str(seconds)
  11. print(ending_time(2,30,59, 12000))

Explanation:

The solution code is written in Python 3.

Firstly create a function ending_time that takes the four required input parameters.

Next, create an if statement to check if the numerator of (seconds + work_times) divided by 60 is over zero. If so, increment the minute and reassign the remainder of the seconds to the variable (Line 2-4).

Next, create another if statement again to check if the numerator of (current minutes) divided by 60 is over zero, if so increment the hour and reassign the remainder of the minutes to the variable (Line 6-8)

Otherwise, just simply add the work_time to the current seconds

At last return the time output string (Line 12).

8 0
3 years ago
The following is not an example of a character device:_____.
melisa1 [442]

The following is not an instance of a character device:  <u>mouse sound card.</u>

<h3>What is a char machine?</h3>

Character machines are devices that do not have physically addressable storage media, such as tape purposes or serial ports, where I/O is normally served in a byte stream.

<h3>What are feeling and block devices?</h3>

The block machines access the disk using the system's normal buffering mechanism. The surface devices provide for direct communication between the disk and the user's read or write buffer.

To learn more about Character machines, refer

brainly.com/question/25280941

#SPJ4

6 0
2 years ago
Peter Chen developed ERDs in 1976. Since then Charles Bachman and James Martin have added some slight refinements to the basic E
shusha [124]

Answer:

Check the explanation

Explanation:

In RDBMS relational database, the keys play an essential role in making the database reliable and relational in which two or more relations (tables) can be divided into a range of relations with the use of diverse types of keys due to which the redundancy decreases and flexibility of data storage increases.

The following are the usage of keys in a database:

   It helps in identifying a specific record that is present in the table.

   It is used in minimizing the redundancy from the tables.

   It is used in removing the multi-valued attributes from the relations.

   it helps in connecting one table with others by using Foreign keys.

   It is used in maintaining the uniqueness of the data stored in the database.

   It helps in identifying the relationship between two or more tables.

Types of keys in a relational database:

   PRIMARY KEY: It helps in identifying each record uniquely due to which the redundancy of data can be minimized.

   FOREIGN KEY: It is a kind of referenced key that helps in making a relationship between two or more tables. It helps in fetching records by combining two or more tables with the help of different joins.

   SUPER KEY: It is a combination of two or more keys that can be selected as primary. It may contain those columns which have repeated values.

   COMPOUND KEY: It is a combination of those columns which may not be used independently as the identification of unique records but their combination does.

   CANDIDATE KEY: It is a kind of a super key that does not contain repeated records. A primary key can be chosen from candidate keys.

8 0
3 years ago
The Cars dataset has three columns giving the quality, machining angle, and machining speed of 18 cars.
yKpoI14uk [10]

Answer:

the answer is going to be dtype

3 0
3 years ago
What allows outlook to automatically flag forward move tag and respond to email messages.
koban [17]

The outlook that  automatically flag forward move tag and respond to email messages is known as Rules.

<h3>What is rules in  terms of an outlook?</h3>

Rules is known to be a function in a system that helps one to move, flag, and answer to email messages automatically.

Note that a person can use rules do some other functions such as:

  • Play sounds.
  • Move messages to folders
  • Show new item alerts.

Learn more about Rules from

brainly.com/question/5707732

5 0
2 years ago
Other questions:
  • List 3 characteristics of the ideal encryption scheme
    6·2 answers
  • What is PHP language
    12·1 answer
  • True or False, PDF documents have many benefits, but their main disadvantage is that the formatting of their text and graphic el
    15·1 answer
  • Lisa wants to send an email with some confidential Information. Which of these options would work best for her?
    6·1 answer
  • What imaging test can tell the speed and direction of blood
    11·1 answer
  • Low-end CRM systems are designed for companies like Boeing because they only have a few, large customers.
    11·1 answer
  • 1.-  POR QUE LOS HUMANOS NOS INTERESAMOS EN ROBOTS CONASPECTO HUMANO?
    8·1 answer
  • Explain the steps in starting the MS Access from the Start Menu.​
    9·1 answer
  • Households play a role in the circular flow of goods by
    12·1 answer
  • How to clear a function in functional component react.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!