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
110011 * 1111 binary calculation
EleoNora [17]

The answer is 1010000

4 0
3 years ago
What is the name given a technological program that typically copies itself and moves through a computer system in order to disr
goldfiish [28.3K]

Answer:

Class of software called "malware"

Explanation:

Some features of malware software:

  • Viruses, worms, Trojans and bots are malware.
  •  Malware is the abbreviation for "malicious software" (malicious code).
  •  Specifically designed to damage, interrupt, illegally steal data from a network.
  • A Trojan it is  software that looks legitimate. Users are typically tricked into loading and executing it on their systems.  

7 0
2 years ago
Question #2
Softa [21]

Hofstede's cultural dimensions describe how the world's cultures differ in six main ways and how different cultures should strive to become the same.

<h3>What are the scale of lifestyle and its influences?</h3>

According to Hofstede, the 5 principal dimensions are identity, power, gender, uncertainty, and time. You can reflect on consideration on cultural fee dimensions on a scale or a continuum, in which one element of the fee lies on one aspect of the dimensions and the opposite intense lies at the opposite give up of the dimensions.

  1. To run VBA withinside the “Microsoft Visual Basic for Applications” window, you can surely press the “F5” key button or click on on the “Run” icon withinside the toolbar.
  2. The Visual Basic button opens the Visual Basic Editor, in which you create and edit VBA code.
  3. Another button on the Developer tab in Word and Excel is the Record Macro button, which routinely generates VBA code that may reproduce the actions that you perform withinside the application.

Read more about the Hofstede's cultural dimensions :

brainly.com/question/7158663

#SPJ1

6 0
2 years ago
Read 2 more answers
What is looping in QBASIC​
Elden [556K]

A looping is a set of instructions which is repeated a certain number of times until a condition is met. hlo dai k xa halkhabar

3 0
3 years ago
Create the strAnalysis() function that takes 1 string argument and returns a string message. The message will be an analysis of
nydimaria [60]

Answer:

def str_analysis(s):

   if s.isdigit():

       s = int(s)

       if s > 99:

           message = str(s) + " is a pretty big number"

       else:

           message = str(s) + " is a smaller number than expected"

       

   elif s.isalpha():

       message = s + " is all alphabetical characters!"

   else:

           message = "There are multiple character types"

   

   return message;

   

s = input("enter word or integer: ")

while s != "":

   print(str_analysis(s))

   s = input("enter word or integer: ")

Explanation:

- Check if the string is digit, alphabetical, or mixed inside the function

- Ask the user for the input

- Call and print the result of the <em>str_analysis</em> function inside the while loop

- Keep asking for the input until the given string is empty

7 0
3 years ago
Other questions:
  • To check whether your writing is clear , you can
    15·2 answers
  • What is the correct order of network types when categorized by their size or the physical area they cover, from largest to small
    10·1 answer
  • Tell me the shortcut keys used in Ms PowerPoint ?​
    6·2 answers
  • What are the only things that can be declared in an interface?
    11·1 answer
  • Switches operate on what layer of the OSI Model
    11·1 answer
  • When you touch a hot stove, along which pathway will the impulses travel and what is the final destination in the cns?
    12·1 answer
  • What happens if none of the selector values match selector in a simple case expression in pl/sql
    6·1 answer
  • Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integer
    9·1 answer
  • Class C Airspace inner ring begins at the __________ and extends vertically (by definition) to MSL charted values that generally
    5·1 answer
  • What is one disadvantage of transmitting personal data using digital signals?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!