Question: E 1 1 0 : Principles of Programming with Java [ Online ] home > multiple features with branches Jump to level 1 Write multiple
E : Principles of Programming with Java Online home multiple features with branches
Jump to level
Write multiple if statements:
If carYear is before print "Probably has few safety features." without quotes
If after print "Probably has seat belts."
If after print "Probably has antilock brakes.".
If after print "Probably has airbags.".
End each phrase with period and newline. Ex: carYear prints:
Probably has seat belts.
Probably has antilock brakes.
import java.util.scanner;
public class SafetyFeatures
public static void main String args f
int caryear;
Scanner input new Scanner
System.in;
caryear input. nextint ;
if carYear
System.out.printProbably has few safety features.";
if caryear
system.out.printProbably has seat belts.";
if carYear
System, out.printProbably has antilock brakes.";
if carYear
system, out.printProbably has airbags.";
else
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
