answer.
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
nevsk [136]
2 years ago
12

Write multiple if statements. If car_year is 1969 or earlier, print "Few safety features." If 1970 or later, print "Probably has

seat belts." If 1990 or later, print "Probably has antilock brakes." If 2000 or later, print "Probably has airbags." End each phrase with a period and a newline. Sample output for input: 1995 Probably has seat belts. Probably has antilock brakes.
Computers and Technology
1 answer:
Kazeer [188]2 years ago
3 0

Answer:

<em>import java.util.Scanner;</em>

<em>public class Hggg {</em>

<em>        public static void main (String [] args) {</em>

<em>            System.out.println("Enter the car make year");</em>

<em>            Scanner in = new Scanner(System.in);</em>

<em>            int car_year = in.nextInt();</em>

<em>            if (car_year<1969){</em>

<em>             System.out.println("Few safety features.");</em>

<em>            }</em>

<em>            else if (car_year>=1970 && car_year<1990){</em>

<em>                System.out.println("Probably has seat belts.");</em>

<em>            }</em>

<em>            else if (car_year>=1990 && car_year<2000){</em>

<em>                System.out.println("Probably has seat belts.");</em>

<em>                System.out.println("Probably has antilock brakes.");</em>

<em>            }</em>

<em>            else if (car_year>=2000){</em>

<em>                System.out.println("Probably has seat belts.");</em>

<em>                System.out.println("Probably has antilock brakes.");</em>

<em>                System.out.println("Probably has airbags.");</em>

<em>            }</em>

<em>        }</em>

<em>    }</em>

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)

You might be interested in
Carrie works on a help desk and is assigned a ticket that was automatically generated by a server because of an error. The error
mixas84 [53]

The windows tool of weapon of choice that Carrie will use to troubleshoot the server is Powershell. All those GUI consoles built by Microsoft for Windows, by default, execute Powershell commands behind the scenes. Every possible thing that Carrie can do with the physical server can easily be accessible through Powershell's command line interface

Further Explanation

I would honestly say that there are a few available tools that Carrie can use, but the best tool is the inbuilt Windows Powershell. As Powershell continues to extend its purpose and usefulness, Microsoft, on the other hand, continues to use Powershell's capability to develop more cmdlets for products like Windows Servers.

Everything that can be done in a GUI environment can be done in Powershell. Carrie should be able to use Powershell to run things more efficiently from the command line without stepping a foot on the physical server. She will only need to access the server from her desk remotely, run a few commands, and that is it. Powershell command line is so powerful; it carries with it every troubleshooting pack that you can think about.

Learn More

brainly.com/question/10178399

brainly.com/question/10338479

#LearnWithBrainly

5 0
2 years ago
Read 2 more answers
What are the pros and cons of using unique closing reserved words on compound statements?
Nata [24]

Pros: Readability. Unique closing reserved words on compound statements will enhance readability and flexibility of a language. When an endwhile or an endif in a program is written by someone else, it is vivid which block is ending. Using braces is much harder is sometimes much harder to read.

Cons: Writability. They have the disadvantage of writability and thus, complicating the language by increasing the number of keywords. Use of more of these reserved words mean less words available for the programmer.







6 0
2 years ago
Using the college registration example from section 6.7.3 as a starting point, do the following:
Arada [10]

Answer:

Explanation:

NCLUDE Irvine32.inc

TRUE = 1

FALSE = 0

.data

gradeAverage WORD ?

credits WORD ?

oKToRegister BYTE ?

str1 BYTE "Error: Credits must be between 1 and 30" , 0dh,0ah,0

main PROC

call CheckRegs

exit

main ENDP

CheckRegs PROC

push edx

mov OkToRegister,FALSE

; Check credits for valid range 1-30

cmp credits,1 ; credits < 1?

jb E1

cmp credits,30 ; credits > 30?

ja E1

jmp L1 ; credits are ok

; Display error message: credits out of range

E1:

mov edx,OFFSET str1

call WriteString

jmp L4

L1:

cmp gradeAverage,350 ; if gradeAverage > 350

jna L2

mov OkToRegister,TRUE ; OkToRegister = TRUE

jmp L4

L2:

cmp gradeAverage,250 ; elseif gradeAverage > 250

jna L3

cmp credits,16 ; && credits <= 16

jnbe L3

mov OkToRegister,TRUE ; OKToRegister = TRUE

jmp L4

L3:

cmp credits,12 ; elseif credits <= 12

ja L4

mov OkToRegister,TRUE ; OKToRegister = TRUE

L4:

pop edx ; endif

ret

CheckRegs ENDP

END main

8 0
2 years ago
Determine the value of base x if (211)x = (6A)16
elena-14-01-66 [18.8K]
211x=6A•16
211x=96A
211x=96A
___. ___
211. 211

x=96A
___
211


It's hard to show fractions on here :•)
7 0
2 years ago
Read 2 more answers
Which of the following connects the processor to the chipset and memory on the motherboard? a. Thread b. FSB c. BIOS d. ALU
IRISSAK [1]

Answer:

The correct Answer is (b) FSB

Explanation:

The chipset is the "superglue" that bonds the microprocessor to the rest of the motherboard and so to the rest of the computer. On a computer, it consists of two basic parts -- the Northbridge and the southbridge. All of the numerous modules of the computer communicate with the CPU over the chipset.

The northbridge joins straight to the processor via the front side bus (FSB). A memory controller is situated on the northbridge, which gives the CPU fast access to the memory. The northbridge also attaches to the AGP or PCI Express bus and to the memory himself.

3 0
2 years ago
Other questions:
  • Michael has increased the contrast of the given picture. Which feature or menu option of a word processing program did he use?
    14·2 answers
  • Which technology had the same effect in the 1920s as the internet did in the 2000s? the widespread effect of technology 1920s 20
    8·1 answer
  • The most direct way for Jonathan to gain on-the-job experience and earn money while attending school is to apply for:
    5·2 answers
  • Write a program that prompts the user to enter the month and year and displays the number of days in the month. For example, if
    13·1 answer
  • Your reputation and credibility will be immediately destroyed if your website contains?
    8·2 answers
  • Write a function called st_dev. St_dev should have one #parameter, a filename. The file will contain one integer on #each line.
    7·1 answer
  • 4. When emergency changes have to be made to systems, the system software may have to be modified before changes to the requirem
    13·1 answer
  • Which XP practice prescribes that "the code [always be] written by two programmers at one machine"?.
    13·1 answer
  • The Coins class was created to hold all your loose change, kind of like a piggy bank! For this exercise, you are going to simula
    15·1 answer
  • In an executing process, the program counter points __________.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!