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
vichka [17]
2 years ago
11

Write multiple if statements: If carYear is before 1967, print "Probably has few safety features." (without quotes). If after 19

71, print "Probably has head rests.". If after 1992, print "Probably has anti-lock brakes.". If after 2002, print "Probably has tire-pressure monitor.". End each phrase with period and newline. Ex: carYear = 1995 prints: Probably has head rests. Probably has anti-lock brakes.
Computers and Technology
1 answer:
Liono4ka [1.6K]2 years ago
5 0

Answer:

public class Main

{

public static void main(String[] args) {

    int carYear = 1995;

   

    if(carYear < 1967)

        System.out.println("Probably has few safety features.");

    if(carYear > 1971)

        System.out.println("Probably has head rests.");

    if(carYear > 1992)

        System.out.println("Probably has anti-lock brakes.");

    if(carYear > 2002)

        System.out.println("Probably has tire-pressure monitor.");

   

}

}

Explanation:

The code is in Java.

Initialize the carYear

Use if statements to handle year before 1967, after 1971, after 1992 and after 2002.

Print the required message for each if statement

You might be interested in
If you see an icon in a document preset that looks like a tiny web browser window, what type of document is the preset meant to
MatroZZZ [7]

Answer:

I think it's D.

Explanation:

As I think that it is an hyperlink button which links to a word or sentence with a website

6 0
3 years ago
To print the number of elements in the array named ar, you can write :
Diano4ka-milaya [45]

Answer:

Option c is correct.

Example :

public class Subject

{

public static void main(String [] args)

{

int ar[]={5,4,6,7,8};

System.out.println("the number of array elements are: ",ar.length);

}

}

Explanation:

The above program is created in java language in which Subject is a class name.Inside Subject class , there is main method.

Inside the main method, there is An array named 'ar' which data type is an integer and we have assigned the value to this array.

in the next line, we are printing the total no. of the element in the array with the length function which displays the length of an array or variable.

8 0
3 years ago
Consider the recursive method myprint in this code snippet: public void myprint(int n) { if (n &lt; 10) { system.out.print(n); }
valkas [14]
What the method does, is it takes the rightmost decade and prints it, then divides by 10 and repeats. Effectively this means the number is printed backwards, so the output is 128.
7 0
3 years ago
What are the differences between a cursor, insertion point and mouse pointer?​
Anna35 [415]

Answer:

Explanation:

A cursor is a pointer which indicates the position of the mouse on a computer's display monitor.

An insertion point is a location in a document where additional information is inserted when the user begins to type.

A mouse pointer is an image used to activate/control certain elements in a GUI (graphical user interface).

I know you asked for the differences, though i thought I'd add a similarity. All of these 3 things are similar, as they show where the position of the info/mouse is. :)

Hope this helps!

-Biscuit08

7 0
2 years ago
In 1839, Talbot released the paper-based process which he called _ to the public.
vlabodo [156]

Answer:

I'm pretty sure it's photogenic drawing.

7 0
2 years ago
Other questions:
  • Which rock band apologized for automatically adding its new album to every iPhone 6 in 2014
    8·2 answers
  • Pointsfor a failover cluster, what type of network would you use to communicate with an iscsi device?
    15·1 answer
  • The first character of the VIN designates which of the following? 
    15·2 answers
  • An Internet user has a need to send private data to another user. Which of the following provides the most security when transmi
    15·2 answers
  • Which of the following are typically an example of primary resources?
    13·1 answer
  • What are the two types of lighting?
    7·2 answers
  • Second Largest, Second Smallest Write a program second.cpp that takes in a sequence of integers, and prints the second largest n
    15·1 answer
  • When looking at security standard and compliance, which three (3) are characteristics of best practices, baselines and framework
    8·1 answer
  • A variable is assigned a value on line 328 of a program. Which of the following must be true in order for the variable to work?
    12·2 answers
  • What are the 3 dimension of an information system?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!