1answer.
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
Serga [27]
2 years ago
5

b. Write a complete program for the following situation related to setting the speed of a car to preset values before starting a

journey: • If speed is less than lower_ set_ speed, display the message "accelerate" to the screen, increase the car's speed to the lower set speed, and output the new speed to the screen. • If speed is greater than upper_set_speed, print the message "apply brake" to the screen, decrease the car's speed to the upper set speed, and output the new speed to the screen. • Give all necessary documentation in the comments, including the file name. • Allow the program to exit at the end. • Output the speed to the screen. • How many different initial speeds will you need to test this code?
Computers and Technology
1 answer:
Orlov [11]2 years ago
3 0

Answer:

U will need 4

Explanation:

You might be interested in
How do you repair a USB?
kaheart [24]

Answer:

You can also try to fix corrupted USB drives with First Aid.

Go to Applications > Disk Utility.

Select the USB drive from the sidebar of Disk Utility.

Click First Aid on the top of the window.

Click Run on the pop-up window.

Wait until the scanning process finished.

Explanation:

8 0
3 years ago
Read 2 more answers
PLEASE HELP WITH MY COMPUTER
qaws [65]

Answer:

try powering it off the turn it back on

Explanation:

5 0
3 years ago
Read 2 more answers
If a user's input string matches a known text message abbreviation, output the unabbreviated form, else output: Unknown. Support
Molodets [167]

Answer:

Here is the JAVA program. I  have added a few more abbreviations apart from LOL and IDK.

import java.util.Scanner; // to take input from user

public class MessageAbbreviation {

public static void main(String[] args) { //start of main() function body

   Scanner input = new Scanner(System.in); // create object of Scanner

       String abbreviation= ""; //stores the text message abbreviation

/* In the following lines the abbreviation string type variables contain the un-abbreviated forms */

           String LOL = "laughing out loud";

           String IDK = "i don't know";

           String BFF = "best friends forever";

           String IMHO = "in my humble opinion";

           String TMI = "too much information";

           String TYT = "take your time";

           String IDC = "I don't care";

           String FYI = "for your information";

           String BTW = "by the way";

           String OMG = "oh my God";

//prompts the user to enter an abbreviation for example LOL

           System.out.println("Input an abbreviation:" + " ");

           if(input.hasNext()) { // reads the abbreviation form the user

           abbreviation= input.next(); }

// scans and reads the abbreviation from user in the abbreviation variable

/*switch statement checks the input abbreviation with the cases and prints the un abbreviated form in output accordingly. */

    switch(abbreviation) {

       case "LOL" : System.out.println(LOL);

                    break;

       case "IDK" : System.out.println(IDK);

                    break;

       case "BFF" : System.out.println(BFF);

                    break;

       case "IMHO": System.out.println(IMHO);

                     break;

       case "TMI": System.out.println(TMI);

                     break;

       case "TYT": System.out.println(TYT);

                     break;

       case "IDC": System.out.println(IDC);

                     break;

       case "FYI": System.out.println(FYI);

                     break;

       case "BTW": System.out.println(BTW);

                     break;

       case "OMG": System.out.println(OMG);

                     break;

                     

       default    : System.out.println("Unknown"); } } }

Explanation:

The program first prompts the user to enter an abbreviation. Lets say the user enters LOL. Now the switch statement has some cases which are the conditions that are checked against the input abbreviation. For example if the user enters LOL then the following statement is executed:

case "LOL" : System.out.println(LOL);

This means if the case is LOL then the message ( un abbreviated form) stored in the LOL variable is displayed on output screen So the output is laughing out loud.

Anything else entered other than the given abbreviations will display the message: Unknown

The output is attached as screen shot.

5 0
3 years ago
Read 2 more answers
Which is an example of the operation of a game?
SVEN [57.7K]

Answer:

D.  

The player uses a joystick to control the character.

Explanation:

The MEANING of operation is: "The fact or condition of functioning or being active."

This explains that the answer is D because you are using the joystick to control the character. Hope the helps.

6 0
2 years ago
Read 2 more answers
A department requires access to the database application from monday to friday, 9am to 5 pm. last thursday at 1 pm, the applicat
iragen [17]

Answer:

90%

Explanation:

90%

ELO 4.2 A department requires access to the database application from Monday to Friday, 9AM to 5 PM. Last Thursday at 1 PM, the application crashed, and it took six hours to fix the problem. What was the availability of the application during the week?

6 0
2 years ago
Other questions:
  • Which computing component is similar to the human brain
    6·2 answers
  • A form of Internet identity theft involving phony e-mail messages asking customers to update their credit card numbers, account
    7·1 answer
  • True or false: Your digital footprint is all the information about you online that only you post. Group of answer choices
    12·2 answers
  • How do I make my own extension for chrome?
    7·1 answer
  • My mac book airs touch pad stopped working and i can't click. what do i do?
    5·2 answers
  • PLEASE HELP!!!!
    7·1 answer
  • What term is used to refer to the way companies collect and process data in order to create new information to make important bu
    13·1 answer
  • All systems have ___________.
    9·2 answers
  • How will the health care professions be affected by all the computerized and technical advances concerning disabilities?
    9·1 answer
  • I need simple app ideas for basic problems<br>​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!