hello, I have a CS project need to be done the 16th 4:00 pm. can you help. it's java programming using...
CS1160 Spring 2014 Introduction to Programming Project #1
Upload the following to the course website for Project #1: • Microsoft Word specifications document (yourLastName_cs1160_project1_algorithm.doc), • exported NetBeans project (yourLastName_cs1160_project1.zip) • snapshot of your running program (yourLastName_cs1160_project1_csnapshot.png) • Microsoft Word output (yourLastName_cs1160_project1_output.doc)
Description of problem: The Wright State University bookstore is considering a new customer loyalty program for Fall 2014. The bookstore wishes to award discount coupons for subsequent visits depending on how much a student spends at once. For example, if a students spends $50 at one time, he or she will get a discount coupon for a subsequent visit worth eight percent of the amount before taxes. Table 1 shows the percent used to calculate the discount coupon awarded for different amounts spent (before taxes). Write a program that given an amount of a bill before taxes, it 1) calculates and prints the subtotal followed by the total bill with tax; and 2) calculates and prints the value of the discount coupon a person will receive based on the amount of a purchase (before tax). Assume the tax rate is currently 6.75% (and is not inputted by the user).
HINT: Make sure your program can easily handle a change in tax rate in the future. Do not just display the statement “Tax is 6.75%.” to the screen. Make sure an associated value is displayed instead.
Table 1. Coupon Percentage Discounts Based on Subtotal plus Message to Display where $DDD.DD is the calculated dollar amount saved.
SubTotal Range % Discount
Message to Display
Less than $10 0% Sorry, you didn't earn a discount today.
$10 <= subtotal < $50 2% You get a discount coupon worth $DDD.DD (2% of today's purchase) for your next visit!
$50 <= subtotal < $100 8% You get a discount coupon worth $DDD.DD (8% of today's purchase) for your next visit!
$100 <= subtotal < $200 12% You get a discount coupon worth $DDD.DD (12% of today's purchase) for your next visit!
subtotal >= $200 20% You get a discount coupon worth $DDD.DD (20% of today's purchase) for your next visit!
Sample Output if User Types 50.25: The subtotal for your purchases is $50.25. Tax is 6.75%. Your total bill today is $53.64.
You get a discount coupon worth $4.02 (8% of today's purchase) for your next visit!
Part I. Write the specifications document (Refer to Lab #1-1). Based on the above description, write a properly-ordered algorithm that includes sections for known values, inputs, calculations, and outputs. Although the algorithm is due at the same time as the final project, you may bring it to your professor for approval ahead of time.
Part II. Write the program Follow the algorithm you wrote in Part I to write a Java program. Be sure to follow your algorithm exactly. Every line of code should correspond to a step in your algorithm, and the order of the steps should be the same. This may require some back-and-forth adjustments to the algorithm as well as to the code.
Part III. Display the Output Run your program five times. For each run, use the amounts shown below as subtotals. Copy and paste the results into a single Microsoft Word document called yourLastName_project1_output.doc. (Do not include the '$' or ',' in the input. These are used only to illustrate dollar amounts.)
a) $0.83 b) $32.81 c) $46.84 d) $100.00 e) $5,729.42
Style requirements: • Use constants within calculations for known values. • All inputs and all results of calculations must be stored in variables. Do NOT do any calculating
within an output statement. All calculations must be completed before any results are displayed. • Divide your code into sections that correspond with your algorithm. At a minimum, this would
include an input section, a calculations section, and an output section. More than one calculations section may be necessary to clarify the various items being calculated.
• Follow the rules on the Style Guidelines document available on the course web site.