Comments in the code

Assignment Help Biology
Reference no: EM131850766

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: EM131850766

Questions Cloud

What is the discount yield and bond equivalent yield : What is the discount yield, bond equivalent yield, and effective annual return on a $5 million commercial paper issue t
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?
Give a brief history of the organization : What we or other nations have done to combat or defeat this problem either conventionally or unconventionally.
Marketable financial assets owned by most individuals : Which of the following is not one of the characteristics of the primary non marketable financial assets owned by most individuals?
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
Define either fukuyama or huntingtons position : Define EITHER Fukuyama or Huntington's position. In doing so, feel free to invoke evidence from current events that supports their respective positions.
Examine competitive markets and value propositions : Define a mid-term competitive vision for the company selected by the student and Examine competitive markets and value propositions for the selected company
Think about the indirect political socialization experiences : Think about some of your own direct and indirect political socialization experiences dating from your years as a child and through to the present.
Evaluate the role and importance of personal ethics : Evaluate the role and importance of personal ethics in the field of psychology, the development of principles, and the code of conduct.

Reviews

Write a Review

Biology Questions & Answers

  Immune response to infectious disease

It is a very curcial concept to understand how the immune response is mounted against viruses, bacteria, protozoans and helminthes. For an effective immune response, both innate and adaptive immunity should work together.

  A review on advanced glycated end products (ages)

This Project report elaborates a critical review of important elements attached to Advanced Glycated End Products (AGEs). It is very crucial to understand the process called Millard reaction.

  Plastic as a soil stabilizer

Soil stabilization is the permanent physical and chemical alteration of soils to enhance their physical properties. Stabilization can increase the shear strength of a soil and control the shrink-swell properties.

  Principles of microbiology

This assignment has three parts which contains questions related to Microbiology. It contains basic principles of microscopy, staining techniques in microbiology and microbial growth in the food industry.

  List the biologic functions

Lipid metabolites are often seen as key elements in cellular signaling. Is this unique? Please provide several examples of the function of lipids as key elements in signal arrays and list the biologic functions these signals affect?

  Biologic function relationships

Please describe how one might search for chemical structure, biologic function relationships, involving small molecular weight lipophylic compounds. Provide one example.

  Case study on patient in the haematology laboratory

Write a case study which detailing a scenario of a patient being investigated in the Haematology laboratory.

  Use of pcr and genetic approaches in biotechnology

The use of PCR and genetic approaches in biotechnology

  Describe the role of this enzyme in honey

Glucose oxidase is an enzyme that can be used for measurements of glucose levels by combining this reaction with an oxygen probe.

  Genetic problems

What phenotypic ratio would you get if you crossed a white mouse and a heterozygous brown mouse?

  Prepare an essay on nosocomial infection

Prepare an essay on nosocomial infection.

  Monitoring and recording the blood pressure

To increase the awareness of monitoring and recording the blood pressure of patients and practice measuring blood pressure in a safe environment.

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