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
alexandr402 [8]
4 years ago
7

Write an application for Cody’s Car Care Shop that shows a user a list of available services: oil change, tire rotation, battery

check, or brake inspection. Allow the user to enter a string that corresponds to one of the options, and display the option and its price as $25, $22, $15, or $5, accordingly. Display Invalid Entry if the user enters an invalid item. Grading Write your Java code in the area on the right. Use the Run button to compile and run the code. Clicking the Run Checks button will run pre-configured tests against your code to calculate a grade. Once you are happy with your results, click the Submit button to record your score.
Computers and Technology
1 answer:
alex41 [277]4 years ago
4 0

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

 System.out.println("Cody’s Car Care Shop");

 System.out.println("Available services: oil change, tire rotation, battery check, and brake inspection");

    System.out.print("Choose your service: ");

    String service = input.nextLine();

    if (service.equals("oil change"))

       System.out.println("Your choice is: " + service + ". Its price is: $25");

    else if (service.equals("tire rotation"))

       System.out.println("Your choice is: " + service + ". Its price is: $22");

    else if (service.equals("battery check"))

       System.out.println("Your choice is: " + service + ". Its price is: $15");

    else if (service.equals("brake inspection"))

       System.out.println("Your choice is: " + service + ". Its price is: $5");

    else

        System.out.println("Invalid entry!");

}

}

Explanation:

Print the available services

Ask the user for the service using Scanner

Check the service user entered using if else structure. If the service matches one of the options that is printed, print out the service and its price

Otherwise, print invalid entry

You might be interested in
What were the first microblogs known as
Greeley [361]
The first micro blogs was once known a tumblogs
6 0
3 years ago
Read 2 more answers
Josh needs to write a research report for his Civics class. Which file type will allow him to save his file? (5 points)
Scorpion4ik [409]

Answer: DOC

Explanation:

DOC is the file format for a word document which is the best type of format that Josh can use when writing a research report. Doc is the default format when typing on Word programs so Josh can save a report in that format.

GIF and JPG are image formats which would not be best for a research report. ZIP is a compressed file and so not ideal either.

7 0
3 years ago
What are screenshots helpful for ?
alex41 [277]

A

Creating.

Explanation:

What else would they be used for

4 0
3 years ago
Read 2 more answers
Larry does not want to save his internet browsing details on his computer. What files should Larry delete to clear his informati
blondinia [14]

C. cookies                      

cuz yeahhhhhhhhhhhh

       

5 0
3 years ago
Read 2 more answers
Why is the song Twinkle Twinkle Little Star an example of ternary form?
Bogdan [553]

Answer:

p it has a three-part musical form it has a repeating section and a following section this makes and this makes it a ternary form

5 0
3 years ago
Other questions:
  • Rachel is on her way to an interview for the position of a project manager. She is trying to prepare for this interview by analy
    6·1 answer
  • Read each scenario, and then select the best wireless device for the worker’s needs. A trucker is constantly on the road. He fre
    8·2 answers
  • In the windows firewall, any rules preceded by a __________ checkmark have not been enabled. black gray green red
    13·1 answer
  • ? Question
    6·2 answers
  • In an income statement subtracting the cost of goods sold from the net sales provides the?
    11·1 answer
  • When can you access the BIOS setup utility?
    14·1 answer
  • How are comments in a Java program treated by the compiler?
    14·2 answers
  • Your program will be used by many departments at the university. Your comments will be important to their IT people. What would
    15·1 answer
  • Read the attached paper titled A Survey of Coarse-Grained Reconfigurable Architecture and comment on it. Make sure to specifical
    5·1 answer
  • Debra tracks her business finances in a spreadsheet. She wants to figure out how much she could increase profits if she raises p
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!