Please answer in Java
Sale! During a special sale at a store, a 10% discount is taken off of purchases over $10.00.
Create an application that prompts the user for the dollar amount of purchases and then
returns the discounted price, if any. The program should neatly display the subtotal before
the discount, the amount of money discounted (if any), the HST applied to the subtotal and
finally the total. The program should be able to handle negative numbers and give an
appropriate message.
Sample Run #1:
Enter the purchase amount: 9.45
No discount applied.
Subtotal: $9.45
HST: $1.23
Total: $10.68
Sample Run #2
Enter the purchase amount: 15.00
10% discount applied.
Subtotal: $15.00
Discount: - $1.50
HST: S1.76
Total: $15.26

Answers

Answer 1

Answer:

Scanner keyboard = new Scanner(System.in);

   

       

       

        double discount = 0;

        double productPrice;

        double subTotal;

        double salesTax;

        double saleTotal;

       

       

       System.out.printf("Enter the purchase amount:");

       productPrice = keyboard.nextDouble();

       

       if (productPrice > 10) {

          discount = 10;

}

       System.out.println( + discount + "% discount applied.");

       

       subTotal = (productPrice);

       salesTax = (subTotal * 0.14);

       saleTotal = (subTotal + salesTax - discount );

       System.out.printf("Subtotal: $%5.2f\n", subTotal);

       System.out.printf("Discount; -$%5.2f\n", productPrice - discount);

       System.out.printf("HST: $%5.2f\n", salesTax);

       System.out.printf("Total: $%5.2f\n", saleTotal + salesTax);

}

}

Explanation:


Related Questions

Place the following STEM inventions in the correct chronological order, from the earliest to the most recent discovery.
Talking doll - Summly app - Blissymbol printer - circular saw


talking doll, circular saw. Blissymbol printer, Summly app

circular saw, Blissymbol printer, talking doll, Summly app

circular saw, talking doll, Blissymbol printer, Summly app

talking doll, Summly app, Blissymbol printer, circular saw

Answers

Probably C

If I’m right, can you mark me brainliest please?

Answer:

c

Explanation:

lol

1. Open the table in__
view.
2. Place the cursor in the Last Name column.
3. On the__ tab, in the Sort & Filter group, click __

Answers

1. Open the table in design view
2. Place the cursor in the last name column
3. On the create tab , in the sort a amp; filter group, click the toggle filter icon

JAVA CODE.


Write a method that takes a Rectangle as a parameter, and changes the width so it becomes a square (i.e. the width is set to the value of the length).

This method must be called makeSquare() and it must take a Rectangle parameter.

Answers

Solution :

public class Rectangle  

{

int len,bre;

Rectangle(int l,int b)

{

setLength(l);

setBreadth(b);

}

void setLength(int l)

{

len=l;

}

void setBreadth(int b)

{

bre=b;

}

int getLength()

{

return len;

}

int getBreadth()

{

return bre;

}

void makeSquare(Rectangle r)

{

r.setBreadth(len);

System.out.println("Square Parameter");

System.out.println("Length:" +r.getLength() + " Length: ".getBreadth());

}

public static void main(String[] args){

Rectangle r=new Rectangle(10,5);

System.out.println("Rectangle Parameter");

System.out.println("Length:"+r.getLength()+" Breadth:"+r.getBreadth());

r.makeSquare(r);

 }

 }

}

In a _error,solution is working but not giving required results

Answers

Answer:

it is a random error

Explanation:

I HOPE THAT THIS ANSWER HELPS YOU

Read the scenario and then choose which type of
report it describes.
A company creates a report detailing research on
the projected sales of a new product.
O customer list
O
market-research report
o
product list
O
sales-volume report

Answers

Answer:

Market-research report.

Explanation:

Market research can be defined as a management strategy that focuses on systematically acquiring informations about occasions, trends, events or patterns through surveys and analysis of information pertaining to the customers of a business firm or organisation so as to understanding their behavior. Therefore, a market-research report would provide a business with informations such as projected sales, industry trends, competitive landscape, market values, industry size through the use of surveys, product tests and reviews.

In this scenario, a company creates a report detailing research on the projected sales of a new product. Thus, this type of represents a market-research report.

Answer:

it's B.

Explanation:

what are each pieces named on the microscope​

Answers

Head/Body houses the optical parts in the upper part of the microscope

Base of the microscope supports the microscope and houses the illuminator

Arm connects to the base and supports the microscope head. It is also used to carry the microscope.

Eyepiece or Ocular is what you look through at the top of the microscope. Typically, standard eyepieces have a magnifying power of 10x. Optional eyepieces of varying powers are available, typically from 5x-30x.

Eyepiece Tube holds the eyepieces in place above the objective lens. Binocular microscope heads typically incorporate a diopter adjustment ring that allows for the possible inconsistencies of our eyesight in one or both eyes. The monocular (single eye usage) microscope does not need a diopter. Binocular microscopes also swivel (Interpupillary Adjustment) to allow for different distances between the eyes of different individuals.

Objective Lenses are the primary optical lenses on a microscope. They range from 4x-100x and typically, include, three, four or five on lens on most microscopes. Objectives can be forward or rear-facing.

Nosepiece houses the objectives. The objectives are exposed and are mounted on a rotating turret so that different objectives can be conveniently selected. Standard objectives include 4x, 10x, 40x and 100x although different power objectives are available.

Coarse and Fine Focus knobs are used to focus the microscope. Increasingly, they are coaxial knobs - that is to say they are built on the same axis with the fine focus knob on the outside. Coaxial focus knobs are more convenient since the viewer does not have to grope for a different knob.

Stage is where the specimen to be viewed is placed. A mechanical stage is used when working at higher magnifications where delicate movements of the specimen slide are required.

Stage Clips are used when there is no mechanical stage. The viewer is required to move the slide manually to view different sections of the specimen.

Aperture is the hole in the stage through which the base (transmitted) light reaches the stage.

Illuminator is the light source for a microscope, typically located in the base of the microscope. Most light microscopes use low voltage, halogen bulbs with continuous variable lighting control located within the base.

Condenser is used to collect and focus the light from the illuminator on to the specimen. It is located under the stage often in conjunction with an iris diaphragm.

Iris Diaphragm controls the amount of light reaching the specimen. It is located above the condenser and below the stage. Most high quality microscopes include an Abbe condenser with an iris diaphragm. Combined, they control both the focus and quantity of light applied to the specimen.

Condenser Focus Knob moves the condenser up or down to control the lighting focus on the specimen.

When do we use numbers instead of strings?

Answers

Answer:

for what, I need more context

Explanation:

Answer:

When you need to do calculations

Explain the simliparities or difference between a workbook , worksheet and spread sheet​

Answers

Answer:

Spreadsheet vs Workbook. Summary: Difference Between Spreadsheet and Workbook is that Spreadsheet software allows users to organize data in rows and columns and perform calculations on the data. ... While Workbook is consider as whole file that can contain bundle of worksheets in it.

Explanation:

mark brainlyist

He rejected all our proposals (replace the nouns in italics by verbs)

Answers

Answer:

Our all proposals are rejected by him.

Identify at least five different Arts, A/V Technology, and Communications careers that you could pursue in your home state, and choose the three that appeal to you the most. Out of the three, write a one-page essay describing which one would be your career choice and the educational pathway that you would have to follow in order to obtain that career. Finally, identify at least three colleges, universities, or training programs that are suited to that career choice. You can use the following resources to help you:

Answers

Answer:

Five careers in the Arts, A/V Technology, and Communications cluster that would be interesting to me are choreographer, museum conservator, reporter, singer, and fashion designer. Of those careers, being a museum conservator, singer, or fashion designer sounds the most appealing to me. Out of all those choices, I think that being a fashion designer seems the most interesting and would allow me to use my creativity.

Fashion designers create patterns and construct sample garments for a target market. They use models to determine how the garments will fit and modify them as necessary to get the desired look. In order to excel in this position, I would need to be able to think creatively; establish working relationships with models, designers, and others in the industry; and organize my time in order to accomplish the necessary work and meet deadlines.

There are several schools that offer a degree in fashion design, such as Savannah College of Art and Design, Academy of Art University in San Francisco, Kent State University, and the University of Cincinnati. Several technical schools also focus on fashion design, such as the Fashion Institute of Design & Merchandising. I think I would choose to attend Parsons in New York, which has turned out many famous fashion designers, such as Marc Jacobs, Jenna Lyons, and Tom Ford.

Explanation:

plato answer

Which is the best method for sending a word-processor document to another
person via e-mail?

Answers

Answer:

Attach the document to the e-mail message as a file attachment.

Hope this helps :)

When converting text to a table, which feature should be used?

Answers

i’m pretty sure it would be an insert tab

Answer: insert tab in ribbon bar

Explanation:

Please help me on this

Answers

Answer:

Phishing

Explanation:

the other answers are just random stuff.

Answer:

It is Phishin

Explanation:

the act of seding out bait aka the fake emails and trying to get people to bite or aka get scammed.

Activity
Using Internet resources, find information on how you will install an operating system on your computer. List the steps you will use for installing
the operating system.

Answers

Answer:

If you want download operating system you need to go to You tube and look video for downloading.

Explanation:

Go to you. I think Now I don't any information.

Answer:

1. I first inserted the Windows XP CD in the CD/DVD-ROM drive. After inserting the CD, the message “Press any key to boot from CD” appeared on the screen. I pressed a key, and the message “Setup is inspecting your computer hardware configuration...” appeared on the screen.

2. Next, I pressed Enter, and the XP setup menu came up to help continue the setup.

3. When the licensing agreement came up, I pressed F8 to agree to the rules and regulations of the agreement contract.

4. Next, I pressed Esc to install a fresh copy of Windows XP.

5. At some point of the installation, I was prompted to create new partition spaces using the partition setup screen.

6. After completing the partition process, I pressed Enter to install XP.

7. Next, I chose the NTFS file system for my drives.

8. Next, I pressed Enter to start the formatting process. At the end of the formatting process, Windows started installing files.

9. I configured my system by responding to the prompts of a setup Wizard.

10. Finally, my system restarted, and the Windows XP installation was complete.

in python:
Write a program that asks the user for the number of hours worked this week and the hourly rate of pay. The program is to calculate the gross pay. If the number of hours worked is greater than 35, the extra hours are paid at 1.5 times the rate. The program should display an error message if the number of hours worked is not in the range 0 to 70

Answers

Answer:

The code is shown below:

Explanation:

Consider the provided information.

The required code is shown below:

hrs = input("Enter the number of hours worked this week: ")

h = float(hrs)

if h<0:

   print("Error")

elif h>70:

   print("Error")

else:

   xx= input("Enter the hourly rate pay: ")

   x=float(xx)

   if h<= 35:

       print(h * x)

   elif h > 35:

       print(35* x + (h-35)*1.5*x)

For better understanding refer to the image shown below.

Write a program to enter a number and test if it is greater than 45.6. If the number entered is greater than 45.6, the program needs to output the phrase Greater than 45.6.

Sample Run
Enter a number: 90
Sample Output
Greater than 45.6

Answers

Answer:

float inp =0;

cin>>inp;

if(inp > 45.6)

    cout<<"Greater than 45.6";

Explanation:

the first line will initialize an float for the input you gonna give the program.

second line will get the input from the user.

third line checks if the given input is greater than 45.6 .if so , it will print "greater than 45.6"

also for your future questions , please note which language your program should be in.

Mobile devices have their own OSs, tailored to their handheld needs, which means they are not immune to what?
malware threats
corporate espionage
crowding out legitimate traffic
specific rules

Answers

Answer:

Malware

Explanation:

Malware is used in many types of software included handheld OS's

Please help!!!! 100 points!!

Answers

Answer:

I DONT GET IT

Explanation:

I was also looking for an answer for the same question lo

Where do you want to install?
It looks like you don't have any applicable device(s) linked to
your Microsoft account. To install, sign in on a device with
your Microsoft assount,
Get more info
How do I do this

Answers

This really depends on the thing you are trying to install, and the device you are trying to install it on.

try to find the app info and see what devices it is compatible with. make sure you are using a compatible device, and make sure you are signed in.

Sunil’s basketball coach asks him to prepare a presentation for his teammates on the proper way to shoot a basketball. After researching the topic online, Sunil decides to add a visual aide to his report.

Which visual aide is the best fit for Sunil’s presentation?

a podcast describing how to shoot a basketball
a video tutorial showing how to shoot a basketball
a graph showing how many players shot a basketball
a sound bite describing a player shooting a basketball

Answers

Answer: a video tutorial showing how to shoot a basketball

Explanation:

It will show them how to shoot the basketball

Answer:

a video

Explanation:

PLEASE HELP Due Today!
Write a paragraph explaining your opinion about the development of artificial intelligence. Minimum of five sentences.​

Answers

I guess I could just give you my opinion?

Urm, well here!

In my opinion, I think artificial intelligence is helping and destroying our country. I think in a way artificial intelligence helps schools and many others who may have learning disabilities. Having an artificial intelligence can help you answer, when you’re scared. Although, the bad part about artificial intelligence is it taking over. We are humans and we should be the ones learning to become better.

Hope that’s okay luv!

HELP PLS QUICK TRUE OR FALSE QUESTION

Compound conditions require a computer to sense whether multiple conditions are true or false.

True
False

Answers

Answer: I think the answer is true but I don't fully understand it sorry if im wrong.

Explanation:

This is false .........

Write difference between hacker and cracker in table.​

Answers

Explanation:

Hackers :

Hackers are kind of good peoples who does hacking for the good purpose and to obtain more knowledge from it. They generally find loop holes in the system and help them to cover the loop holes. Hackers are generally programmers who obtain advance knowledge about operating systems and programming languages. These people never damage or harm any kind of data.

Crackers :

Crackers are kind of bad people who breaks or violates the system or a computer remotely with bad intentions to harm the data and steal it. Crackers destroy data by gaining an unauthorized access to the network. There works are always hidden as they are doing illegal stuff. Bypasses passwords of computers and social media websites, can steal your bank details and transfer money from bank.

Read the scenario and then choose which type of
report it describes.
A human-resources director creates a report
containing the names and contact information of
employees at the company.
O customer list
O employee list
O medical record
0 sales-volume report

Answers

Answer:

employee list.

Explanation:

An employee list can be defined as a textual document that comprises of important informations such as names, contact address, gender, religion, next of kin, home address etc., about an employee working in an organization or business firm.

In this scenario, a human-resources director creates a report containing the names and contact information of employees at the company. Thus, this report represents an employee list.

The main purpose of an employee list is to provide a detailed description or information about all of the employees working in an organization at a specific period of time.

Answer:

B; Employee List

To date, what has most propelled the digital revolution?
A. Multimedia advertising
B. Social networking sites
C. Desktop computers
D. Cellular phone calls​

Answers

The answer is Computer Networks. The development that has contributed most to the digital revolution is the Computer Networks. The Digital Revolution refers to the advancement of technology from analog electronic and mechanical devices to the digital technology which we have today. So it's B because computer networks is a social networking site

how could technology help our physical bodies

Answers

Answer: it can help our boodies by getting people more muscular and,like a treadmill.

Explanation:

Technology can help our physical bodies by reminding us to take pills or to workout or to eat or drink. Or like previously mentioned using a treadmill and other automated equipment

i need help, thank you

Answers

Answer:

i think i might be the 3 answer

Explanation:

i need help, thank you

Answers

Answer:

umm I think it's C it's between that one and d so the 1st and 4th but leaning more towards C

Which of the following best describes the purpose of video careers?


To catch the attention of customers


To gain an emotional connection between two people


To create motion images for public entertainment, news or education

To make an employer laugh

Answers

To create motion images for public entertainment news or education

Chris wants to view a travel blog her friend just created. Which tool will she use?

HTML
Web browser
Text editor
Application software

Answers

Answer:

Web browser

Explanation:

HTML, text editor and application software are all tools used by developers in coding the format of a blog. Computer languages such as Cascading Style Sheet (CSS), JavaScript, Personal Homepage Pre-processor, and HyperText Markup Language are used in such coding and an ordinary user will not be able to understand such a language.

To view the travel blog when it is ready and in everyday language, a web browser should be used. The blog name is entered and Chris can see all the features of the blog.

Other Questions
A north magnetic pole brought near a south magnetic pole will...A) cancel the south pole.B) attract the south pole.C) repel the south pole. What are the solutions of the equation x4 - 5x2 - 14 = 0? Use factoring to solve.x = +/- 7 and x = +/- 2x = +/- i7 and x = +/- i 2x = +/- i 7 and x = +/- 2x = +/- 7 and x = +/- i 2 ANSWER ASAP WILL MARK BRAINLIEST The owner of Carlisle Construction is a littleoverprotective of his brand new cement mixer,so each night, he parks it in a storage facilitythat is 120 feet long, 45 feet wide, and 45feet high. What is the facility's volume in cubicyards? Please help me with this What elements are made from the body Find the quotient by using a grid or drawing a picture.720 16A.46B.47C.45D.48 Why did Grant continue attacking Lees forces in northern Virginia even though he had lost about 55,000 troops?(a) Grant realized his access to men and supplies was almost unlimited, while Lee was running out of both. (b) Grant believed so strongly in freedom for African Americans that he was willing to sacrifice all his troops.(c) Lincoln had commanded Grant not to retreat, no matter what happened on the battlefield.(d) Grant knew that Lee had lost even more men in the battle than the Union had. -2(3x-2) + 2x = -6X - 10 How does the author foreshadow the outcome of Icarus's flight? Use evidence from the text to support your answer. Use coordinate adjectives and correct punctuation. A machine can print 300 posters in 10 minutes. How many posters can the machine print in 2 minutes? 4. Jamal is using aesthetic scanning to critique a piece of art. He is asking himself questions about the techniques and skills of the artist who made the piece. What step of aesthetic scanning is he MOST likely working on? A pea plant that is heterozygous for the tall phenotype can produce short offspring when self-pollinating. Which of the following explains why this occurs? what is a CTE program? Why cloth and leather are used to make safety clothing for people who work with heat. A.they are both good sources of heat. B they both can produce electrical energy C they both can absorb light energy. D they are both poor conductors of heat ple answer the question12x+8x-3x-2 / 4x+1 How did the Declaration of Independence justify the colonist demand for independence? why did king george have a problem with the proficy? To boil water it requires heat , what happens to the heat when the water cools down as energy can neither be destroyed nor be created ? i need help with this