The methods getsaleprice and getsaleweight

Assignment Help JAVA Programming
Reference no: EM131009475

The program must include five methods: printSale, getSalePrice, getSaleWeight, calcTax, and calcShipping. The method printSale takes no input parameters and has a return type of void; it prints values by by calling the other four methods and computing the sale total. The methods getSalePrice and getSaleWeight each return a double, which they get from user input. The method calcTax takes a double (the sale price) as a parameter and returns a double that is the amount of tax (use 6% as a fixed tax rate). The method calcShipping takes a double (the sale weight) as a parameter and returns the shipping amount as a double (calculate shipping as $10 if weight is less than 10, and $20 if weight is 10 or greater). The method printSale should print the sale price amount, tax amount, shipping amount, and sale total amount (sale price plus tax and shipping). 

Reference no: EM131009475

Questions Cloud

Find the absolute minimum value of the given function : Find the x-coordinate of the local maximum of f(x) = x3 - 2.7x2 - 2.8x. Find the absolute minimum value of the following function on the interval [0,2].
Multi-threading concepts : Multi-threading concepts: What is the output of the following program? class Threading{
What implications does this have for hiring and promotions : Given the emphasis on employee development, what implications does this have for hiring and promotions? How do you think, management feels about the new performance appraisal system? Why
Coefficient of determination and interpret the results : Find the (a) coefficient of determination and interpret the results, and (b) standard error of estimate s e and interpret the results.
The methods getsaleprice and getsaleweight : The program must include five methods: printSale, getSalePrice, getSaleWeight, calcTax, and calcShipping. The method printSale takes no input parameters and has a return type of void; it prints values by by calling the other four methods and computin..
What was the a priori probability : There were 20 subjects in each group. If we assume that the true means and standard deviations have been estimated exactly, what was the a priori probability (the probability before the experiment was conducted) that this study would find a signif..
Determine the intervals on which the function is increasing : Determine the intervals on which the function is increasing and intervals on which the function is decreasing. Check your answers by graphing (grapher) the corresponding functions. Include copies of these graphs.
Discuss the relevant theory behind these dilemmas : Ethics, Values, and Social Responsibility - Identify at least three ethical dilemmas that a leader must contend with in order to meet the values and code of ethics of an organization. Discuss the relevant theory behind these dilemmas
Can you express sympathy with someones negative situation : Can you express sympathy with someones negative situation without apologizing for the circumstances? Explain your answer - Is intentionally deemphasizing bad news the same as distorting graphs and charts to deemphasize unfavorable data?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a java program using array to auto-grade exams

Write a JAVA program using 2D Array to auto-grade exams. For a class of N students, your program should read letter answers (A, B, C, D) for each student.

  Number of space characters in a string

Write a loop that counts the number of space characters in a string - You need to implement a program to find the number of spaces.

  Temporarily move to the street so that the

Driveway is a "last-in, first-out" stack. Of course, when a car owner retrieves a vehicle that wasn't the last one in, the cars blocking it must temporarily move to the street so that the requested vehicle can leave

  Create a java gui application using netbeans

Create a Java GUI application using Netbeans that allows the user to enter the number of hours spent in each activity and then calculates the number of pounds lost.

  Implementation of tru file system

you are expected to design and implement TFS. It is a file system that can be used on a standalone machine. There are several simplifying assumptions such as a single application is accessing the file system at any given time

  What ways can vulnerable inmates be protected

What ways can vulnerable inmates be protected? Why are classification and housing assignments so critical to these populations?

  Sudoku game - java program

You will be designing a simple Sudoku Game.  The rules of Sudoku can be found on web. The rules are explained:

  Explain why the teller application can call the withdraw

Explain why the Teller application can call the withdraw and deposit methods using a SavingsAccount object reference, even though we did not define these methods

  Program to maintain list of names with associated numbers

Write a complete subclass of SimpleList named ListSet where the ‘add' method is overridden such that a ListSet will never contain duplicate items - Write a program to maintain a list of names with associated telephone numbers.

  What is meant by the name dynamic array

So how would you dimension this array if you don't know how many elements you will need? Sure, you could dimension the array to be very large arrStudents[1000], but that would be a big waste, especially if you ended up only needing 5 elements, so ..

  Write the program with java class and filename pythagorasxy

Write pseudocode in a text editor that shows the program sequence: 1) output explanation of the program purpose, 2) query the user for the sides of the triangle, 3) compute the length of the hypotenuse, 4) output the result.

  Java program to write-read data from user using i-o function

Write java program to write and read data from user using I/O functions. Describe class with data members name[20],emp_id,basic pay,net pay.calculate all the allowances.

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