Question: Part 2 : 1. Modify the program to read user input for carYears 2. Write multiple if statements. If carYear is 1969 or earlier, print
Part 2 :
1. Modify the program to read user input for carYears 2. Write multiple if statements. If carYear is 1969 or earlier, print "Probably has few safety features." If 1970 or higher, print "Probably has seat belts." If 1990 or higher, print "Probably has anti-lock brakes." If 2000 or higher, print "Probably has air bags." 3. End each phrase with period and move the cursor to a newline.
Ex: carYear = 1995 prints: Probably has seat belts. Probably has anti-lock brakes.
import java.util.Scanner;
public class CarFeatures { public static void main (String [] args) { int carYear = 0;
carYear = 1940;
/* Your solution goes here */
return; } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
