Answer:
import java.util.Scanner;
public class Hggg {
public static void main (String [] args) {
System.out.println("Enter the car make year");
Scanner in = new Scanner(System.in);
int car_year = in.nextInt();
if (car_year<1969){
System.out.println("Few safety features.");
}
else if (car_year>=1970 && car_year<1990){
System.out.println("Probably has seat belts.");
}
else if (car_year>=1990 && car_year<2000){
System.out.println("Probably has seat belts.");
System.out.println("Probably has antilock brakes.");
}
else if (car_year>=2000){
System.out.println("Probably has seat belts.");
System.out.println("Probably has antilock brakes.");
System.out.println("Probably has airbags.");
}
}
}
Step-by-step explanation:
In this solution, multiple if statements have been used to accomplish each step. Observe that there are more than one print statements when year is greater than 1990 because the condition applied to year greater than 1970 holds true for every year greater than 1970 (1990, 2000 etc)