Follow the comments in the code

Assignment Help Basic Computer Science
Reference no: EM131848511

Follow the comments in the code, as these include more instructions. The code should be able to calculate the total and then add the tax of 2.3%, to print out the final total. Also note that there are various places with empty comments ("//"s with nothing after it) - fill in your own comments here to describe the code below that line. The code is below!

import java.util.Scanner;

public class LabQuestion8 {

public static void main(String[] args) {

//---- Declare all the variables here

int choice = 0, num = 0;

double total = 0;

Scanner scan;

final double tax = 0;

//-----------------------------------

System.out.println("Please select 1 of the following options to buy: ");

System.out.println("1. Shirts (7$ / item)");

System.out.println("2. Pants (10$ / item)");

System.out.println("3. Top  (5$ / item)");

//On the next line, write the code to scan an integer called choice. Use the necessary input

//

if(choice == 1)

{

//Here, ask the user how many shirts they would like to buy. Based on that quantity and the price per shirt, calculate the total.

//

}

else if(choice == 2)

{

//Here, ask the user how many pants they would like to buy. Based on that quantity and the price per pants, calculate the total.

//

}

else if(choice == 3)

{

//Here, ask the user how many top they would like to buy. Based on that quantity and the price per top, calculate the total.

//

}

total = total * tax; //

System.out.println("Hello Customer, Thank you for your purchase at our store.");

// below, write the code to print the total bill

System.out.println("Your total bill was : ");

}

}

 

Reference no: EM131848511

Questions Cloud

Create a tax plan for the future redemption : Create a tax plan for the future redemption of the client's stock owned in the construction company that will not be taxed according to Section 301 of the IRC.
Granted access to an efs-encrypted file : Please describe what a "FEK" is and how it's used? Feel free to research EFS. With some detail, how can multiple people be granted access to an EFS-encrypted
Differences between ntfs disk quotas and fsrm quotas : What are the differences between NTFS disk quotas and FSRM quotas? How do each actually determine usage?
Identify a change or innovation that benefit current field : Identify a change or innovation that would benefit your current field of specialization(Emergency Management Specialist)
Follow the comments in the code : Follow the comments in the code, as these include more instructions. The code should be able to calculate the total and then add the tax of 2.3
Research on security vulnerabilities associated with scada : Research on security vulnerabilities associated with SCADA and digital industrial control systems. Summarize the major security concerns .
Given the following array what is the first element : Given the following array what is the first element?
Describe key components of strategic planning process : Identify the strategic planning outcomes. Keep in mind that outcomes should be specific and measurable. Describe key components of strategic planning process.
Compute the profit and loss from only the repo transaction : Compute the profit/loss from ONLY the Repo transaction. Which of these bonds will you use for the Repo transaction?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd