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
Input a number and find the square root only if the number entered is greater than or equal to zero.
Svetradugi [14.3K]

number = float(input("Enter a number: "))

if number >= 0:

   print(number**0.5)

I hope this helps!

5 0
3 years ago
Describe an application where a parallel circuit might work better than a series circuit.
PtichkaEL [24]

The application is electricity in the home.  Every light bulb, appliance,
and wall-outlet in your house is in parallel with all the others. 

If any electrical devices in your house were in series, then whenever
you turned any of those off, they would ALL go off. 

Also, the ones that needed the least power, like a night light, would get
the most, and the ones that needed the most power, like the refrigerator,
would get the least.

8 0
4 years ago
Lydia is trying to take an aerial shot from the window of an airplane. Where should she hold her camera to get the best shot?
IrinaVladis [17]
Inside The window inside the house
8 0
3 years ago
Is the intersection of a column and a row
Alex17521 [72]

A Cell hope you enjoy your answer

3 0
2 years ago
Ruth-Anne has created a document. She wants page 3 and all the pages after it to be formatted with two columns.
sertanlavr [38]

The correct answer is D. Go to page 3, click Page Layout, click Columns, click two.

Explanation

When you want to make a digital document, one of the most recommended tools for its quality and ease is Microsoft Word. In this program, you can edit documents as you wish, change the font, the font size, the distance of the margins, among other options. One of the options offered by this program is to add two or more columns of text, to carry out this action it is necessary to go to the page where you want to put two or more columns (in the case of Ruth-Anne, page 3), then click Page Design, there a menu is displayed in which the Columns option is found, click this option and there it will give us the option to choose the number of columns that we want to put (in the case of Ruth-Anne two columns), this will make this and subsequent pages have this setting in two or more columns of text. Therefore, if Ruth-Anne needs to make these edits to her document, she must follow these steps. So the correct answer is D. Go to page 3, click Page Layout, click Columns, click two.

4 0
3 years ago
Other questions:
  • You use this method to determine the number of items stored in an arraylist object.
    12·1 answer
  • A(n) _______ is text or a graphic you can click to jump to another file or to somewhere else in the same file. quizle
    12·1 answer
  • You can write as many constructors for a class as you want, as long as they all have different ____ lists.
    8·1 answer
  • Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    9·2 answers
  • Is number 1 correct​
    7·2 answers
  • A computer takes a lot of time to do complex calculation​
    9·1 answer
  • What does GUI stands for and what is it function?​
    5·2 answers
  • Arrange these steps of creating a presentation in the correct order. (notice that the given order is incorrect other than the ba
    13·1 answer
  • How to download film​
    14·2 answers
  • In what year was the earliest documented use of the word computer?.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!