Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Biology Expert

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 : ");

}

}

Biology, Academics

  • Category:- Biology
  • Reference No.:- M92679124
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Biology

Use of molecular tools and bioinforrnatics in the diagnosis

Use of Molecular Tools and Bioinforrnatics in the Diagnosis Characterization of Enteric Pathogens from a Case Study Purpose: The purpose of this project is to familiarize the student with modern molecular tools and bioin ...

Trace the flow of carbon within the process of

Trace the flow of carbon within the process of photosynthesis. Be sure to include the following terms in your description: Glucose.NADPH,ATP, Calvin cycle, RUBISCO,CO2.

Igfbp2 rbp4 and factor d post bariatric surgeryigfbp2 what

IGFBP2/ RBP4 and Factor D Post Bariatric Surgery IGFBP2 ( what the normal physiological action in the body? And how it affectedby obesity? andpost bariatric surgery?) RBP4 (what the normal physiological action in the bod ...

Krebs cycletca cyclewhat are the reactantswhat are the

Krebs Cycle/TCA cycle What are the reactants? What are the products? What is the net ATP gain? Where does it take place in prokaryotes vs eukaryotes?

Question dietary recommendation and analysis projectin this

Question: Dietary recommendation and analysis project In this project, you will use software to analyze our own diet and make dietary recommendation. You will need submit a report. You can choose any of software if you f ...

What is the complementary strand for 5-atgcatgcatgccc-3how

What is the complementary strand for: 5'-ATGCATGCATGCCC-3' How many turn(s) will this strand have? Are Eukaryotic cells always diploid during S phase whereas bacteria are only haploid at the end of DNA replication?

1 is a vitamin that sunlight on the skin typically

1. __________ is a vitamin that sunlight on the skin typically triggers within the body. 2. The specific cell type that produces bone tissue is called _____________. 3. The four components of a negative feedback loop ___ ...

What is the phenotypic ratio for the offspring of a mother

What is the phenotypic ratio for the offspring of a mother who is homozygous dominant for blonde hair and a blonde-haired father who is heterozygous.

Bioinformatics assignment -in this assignment should check

Bioinformatics Assignment - In this assignment should check the following sequence and test whether it has the following restriction cut sites. This searching should be done globally, that is, it should check for all pos ...

Chosen dr jan nolta- stem cell researcher head of uc davis

Chosen Dr. Jan Nolta- Stem Cell Researcher Head of UC Davis Stem Cell Program Director Topic Background: early Stem cells have the ability to develop into many different types of cells. Stem Cell Research is not without ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As