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]
3 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]3 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
Based on the Standards, the statement, "Competition for computer time during periods of high demand had become intense because o
frozen [14]

Answer:

cause

Explanation:

According to my research, I can say that based on the information provided within the question this is an example of a "cause". This refers to something that makes something else happen, and is usually stated by the word "because". For example in this situation the a "planned increase in the use of the computer by operating departments" caused a "Competition for computer time during periods of high demand to become intense".

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

3 0
3 years ago
How do you measure the capacity of speed and memory of computer system<br>Explain.​
jeka94
Im sorry i just need points
3 0
3 years ago
I NEED HELP!!! BRAINLIEST!!!
Trava [24]

Answer:

DHCP Dynamic Host Configuration Protocol:

Is a network service that automatically assigns IP addresses and other TCP/IP configuration information on network nodes configured as DHCP clients. Server allocates IP addresses to DHCP clients dynamically. Should be configured with at least one DHCP scope. Scope contains a range of IP addresses and a subnet mask, and can contain other options, such as a default gateway and Domain Name System. Scope also needs to specify the duration of the lease and usage of an IP affects after which the node needs to renew the lease with the SHCP server. Determines the duration, which can be set for a defined time period or for an unlimited length of time.

DNS Domain Name Service: Is a TCP/IP name resolution service that translates FQDNs into IP addresses. System of hierarchical databases that are stored on separate DNS servers on all networks that connect to the Internet. DNS servers store, maintains and update databases, they respond to DNS client name resolution requests to translate host names into IP addresses.

DNS Components

DNS database is divided logically into a heieratchical grouping of domains. Physically into files called zones. Zone files contain the actual IP-to-host name mapping for one or more domains. Zone files is stored on the DNS server that is responsible for resolving hot names for the domains contained in the zone. Each network node in that domain will have a host record within the domain's zone files. Includes the node's host name, FQDN, and assigned IP address.

DNS Servers

*If you are configuring static IP addresses, including the IP address of the default DNS servers as you configure each client.

*If you are using DHCP, use the DHCP scope options to specify the IP Explanation:

3 0
2 years ago
Read 2 more answers
One common command-line network utility tool is “netstat,” which displays which protocol is being used. It can review particular
labwork [276]

An example of two potential uses of this command is in the area or aspect of:

  • The troubleshoot of networking problems.
  • In configuration

<h3>What protocol does the netstat command use?</h3>

It is known to use the Internet Protocol (TCP/IP) and it is one that is used without parameters, this command  is said to often show active TCP connections.

<h3>What is netstat used for?</h3>

The network statistics ( netstat ) command is known to be a kind of a networking tool that is often used for troubleshooting and configuration, and this is one that can be used as a tool for monitoring for connections over the network.

Hence,  it is used in incoming and outgoing connections, routing tables, port listening, and others. Therefore, An example of two potential uses of this command is in the area or aspect of:

  • The troubleshoot of networking problems.
  • In configuration

Learn more about troubleshoot from

brainly.com/question/9572941

#SPJ1

3 0
2 years ago
In this exercise you will debug the code which has been provided in the starter file. The code is intended to do the following:
abruzzese [7]

Answer:

The corrected code is as follows:

import java.util.Scanner;

public class U2_L4_Activity_Two{

public static void main(String[] args){

Scanner scan = new Scanner(System.in);

String str1 = scan.nextLine();

String str2 = str1;

str1 = str1.toUpperCase();

System.out.println(str1);

System.out.println(str2);

}

}

Explanation:

This corrects the scanner object

Scanner scan = new Scanner(System.in);

This line is correct

String str1 = scan.nextLine();

This copies str1 to str2

String str2 = str1;

This converts str1 to upper case

str1 = str1.toUpperCase();

This prints str1

System.out.println(str1);

This prints str2

System.out.println(str2);

8 0
3 years ago
Other questions:
  • Sahil is making a graphic novel in which the villain plans to reduce the rate at which energy is released from the Sun. The vill
    7·2 answers
  • During an interview, your non-verbal communication (body language, gestures, tone of voice, speed of talking,
    6·1 answer
  • If you have a charger that’s not from Apple, then could that damaged your iPhone or not?
    5·1 answer
  • What is the multiple source test
    15·1 answer
  • Can find error , suppose to print what season it is and if fails : Traceback (most recent call last):
    11·1 answer
  • 8.10 quiz edhesive A swap is: a variable used to find the smallest value in an array an algorithm used to find a value in an arr
    12·1 answer
  • Using a computer application is known as​
    11·1 answer
  • What does it mean to clear a setting in a dialog box?
    14·1 answer
  • Please answer this question​
    6·1 answer
  • a 2x4 line decoder with enable is implemented using nand gate only. how many nand gate is needed to construct this line decoder?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!