Write a program to display a simplified bill

Assignment Help JAVA Programming
Reference no: EM131006098

1. Repair Bill: Suppose automobile repair customers are billed at the rate of $35 per hour for labor. Also, suppose costs for parts and supplies are subjected to a 5% sales tax. Write a program to display a simplified bill. The customer's name, the number of hours of labor, and cost of parts and supplies should be entered into the program via text boxes. When a button is clicked, the customer's name and the three costs should be displayed in a list box, as shown in fig.

2259_3.49.png

2. Write a program to make change for an amount of money from 0 through 99 cents input by the user. The output of the program should show the number of coins from each denomination used to make change. See fig

1558_3.50.png

3. Nutrition: The American heart association suggests that at most 30% of the calories in our diet come from fat. Although food labels give the number of calories and the amount of fat per serving, they often do not give the percentage of calories from fat. This percentage can be calculated by multiplying the number of grams of fat in one serving by 9 and dividing that number by the total number of calories per serving. Write the program that requests the name, number of calories per serving and the grams of fat per serving as input, and tells whether the food meets the American heart association recommendation.

4. Write a program to analyze a car loan. The user should enter the amount of the loan, annual percentage rate of interest, and the duration of the loan in months. When the user clicks on the button, the information that was entered should be checked to make sure it is reasonable. If bad data have been supplied, the user should be so advised. Otherwise, the monthly payment and the total amount of interest paid should be displayed. The formula for the monthly payment is:

Monthly payment= p.r­­­l - (l+r) -n

where p is the amount of the loan, r is the monthly interest rate (annual rate divided by 12) given as a number between 0 (for 0%) and 1(for 100%), and n is the duration of the loan in months. The formula for the total interest paid is
total interest= n . [monthly payment] - p

5. Restaurant bill: A fast food vendor sells pizza slices ($1.75), fries ($2.00) and soft drinks ($1.25). Write a program to compute a customer's bill. The program should request the quantity of each item ordered in a Sub procedure, calculate the total cost with a function procedure, and use Sub procedure to display an itemized bill.

6. Rule of 72: This rule is used to approximate the time required for prices to double due to inflation. If inflation rate is r%, then the rule of 72 estimates that prices will double in 72/r years. For instance, at an inflation rate of 6%, prices double in about 72/6 or 12 years. Write a program to test the accuracy of this rule. For each interest rate from 1% to 20%, the program should display the rounded value of 72/r and the actual number of years required for prices to double at an r% inflation rate. (assume prices increase at the end of each year).

326_6.65.png

Reference no: EM131006098

Questions Cloud

Can the present value of minimum lease payments : Can the present value of minimum lease payments differ between the lessor and lessee? If so, how?
Business law case study : Business Law case study - In the Lee case, there was a losing side. That side will look for an error in the rules the judge applied in order to appeal. The winning side will attempt to defend the judge's use of the rules that produced the winning ..
What is a trading bloc and a trade concentration ratio : What is a trading bloc and a trade concentration ratio, and does it make sense that trade concentration ratios should be greater than +1? What kind of trading bloc is NAFTA and how has it influenced trade within the bloc? What is multilateralism and ..
Write a program to display a simplified bill : Write a program to display a simplified bill. The customer's name, the number of hours of labor, and cost of parts and supplies should be entered into the program via text boxes. When a button is clicked, the customer's name and the three costs sh..
What is difference between specific tariff-ad valorem tariff : Submit answers to the following questions in the unit drop box. You must explain your answer and provide your supporting computations. Yes/No answers or simple numbers are not acceptable and will not receive full credit. Why does a sales tax shift a ..
Compare the way a bargain purchase option : Compare the way a bargain purchase option and a residual value are treated by the lessee when determining minimum lease payments.
Interest rate during the great depression : Use the IS-LM model to illustrate graphically the impact of the Pigou effect on the equilibrium level of income and interest rate during the Great Depression, when prices were falling.
Find an equation of the planes tangent to the given surfaces : Find an equation of the planes tangent to the following surfaces at given points, x2 - 2y2 + z2 / 4 = 3, at (√2, 0, 2). z = xy - 25 at (1, 16, -9).

Reviews

Write a Review

JAVA Programming Questions & Answers

  1 ra row your boatprepare a world with a boat a person

1. ra row your boatprepare a world with a boat a person sitting in the boat an island and a pier located 25 meters from

  Study the code and implement the operator overloading

The Table Q3 on the next page is the code of a class named Circle. Study the code and implement the operator overloading for these relational operators ( , >=) for the Circle class. Then, write a test program that creates two instances of the Circle ..

  Define an enum type in the librarybook class

Define a class variable, totalTVs, whose purpose is to keep track of the total number of Television objects constructed during execution of a program that uses the Television class - Define an enum type in the LibraryBook class corresponding to the..

  Constructor that accepts a file name as its argument

Write a class with a constructor that accepts a file name as its argument. Assume the file contains a series of numbers, each written on a separate line. The class should read the contents of the file into an array, and then displays the following..

  Convert the following expression to postfix

Convert the following expression to postfix. ( 5 * ( ( 9 * 8 ) + ( 7 * ( 4 + 6 ) ) ) )

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  Write java program to reads ten values from user

Write the java program which reads 10 values from user and store them in 1 daimantion array. your program will ask the user wich operation he wants to perform:

  Write a program that displays a countdown first

Write a program that displays a countdown first, and then displays the position and velocity of an object for every second it drops, as long as it is above 500 feet

  Which is the best character high value

When updating a master file with data from a transaction file, what should happen for an addition record when a match is found in the master file?

  Create class called hospital and add all relevant attributes

Create a class called Hospital and add all the relevant attributes for the created class - Create a User's super class that contains all the properties common to the all the users that will be using the Hospital patient billing system.

  Write down a java program which prints out all 92 solutions

write a java program which prints out all 92 solutions of the 8-queen problem but modify the program to display only

  Screenshots for actual output after testing

Coversheet Title page (including acknowledgements) Table of contents Design Include the algorithm and class diagram of your code under this section 5. Testing Use the table given below to provide your test data. Include screenshots for actual outp..

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