Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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.' End each phrase with period and newline. Ex: carYear = 1995 prints: Probably has seat belts. Probably has anti-lock brakes. public class CarFeatures { public static void main (String [] args) { int carYear = 0: carYear = 1940: if(carYear lessthanorequalto 1969) { System.out.println("Probably has few safety features."): } else if (carYear greaterthanorequalto 1970) { System.out.println("Probably has seat belts."): } else if (carYear greaterthanorequalto 1990) { System.out.println("Probably has anti-lock brakes."): } else if (carYear greaterthanorequalto 2000) { System.out.println("Probably has air bags."): } return: } }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

1 2 3 Data Base Techniques

Authors: Dick Andersen

1st Edition

0880223464, 978-0880223461

More Books

Students also viewed these Databases questions

Question

a. What is the purpose of the team?

Answered: 1 week ago

Question

a. How are members selected to join the team?

Answered: 1 week ago

Question

b. What are its goals and objectives?

Answered: 1 week ago