STUDYSHIELDS ASSIGNMENT HELP

  • Home
  • Blog
  • Courses
    • Child Category 1
    • Child Category 2
    • Child Category 3
    • Child Category 4
  • Services
  • Country
    • Childcare
    • Doctors
  • Home
  • Blog
  • Sample Works
  • Order Now

Wednesday, January 13, 2016

Write a java application that calculates and displays the total payable after applying discount on online grocery orders for N customers.

 January 13, 2016     No comments   


This assessment item is designed to test your understanding of data types, classes, objects, methods, operators, standard input/output, loops, and if statements.
Assessment task
Write a java application that calculates and displays the total payable after applying discount on online grocery orders for N customers. The N should be set as a constant (final) in your application and choose a value between 7 and 9.The discount rates are as shown below in Table 1. Table 1: Discount Details
Purchase Amount Applicable Discount Rate %
Below $75 0%
= $75 and $100 5%
= $100 and $150 7%
= $150 and $200 9%
= $200 11%
The program should ask the user to enter the first name of the customer and the total purchase amount in dollars. The purchase amount should be between 10 and 400. Validate the user input, display error message and allow the user to correct the error by reading two more entries for the purchase amount.
Based on the purchase amount, the program should apply the applicable discount and calculate the total payable amount. The application should display a message with first name, and total payable. At the end of the Nth customer the program should display a summary of purchases displaying the largest purchase amount, smallest purchase amount, total payable for all customers, and total discount amount applied. The format of your input and output must be same as given in example below.
Enter the name for Customer 1: John
Enter the purchase amount for Customer 1: 68
Hi John, the total payable is $68.0
Enter the name for Customer 2: Sally
Enter the purchase amount for Customer 2: 95
Hi Sally, the total payable is $90.25
Enter the name for Customer 3: James
Enter the purchase amount for Customer 3: 140 Hi James, the total payable is $130.20
Summary of Purchases
Largest purchase amount: $140.00
Smallest purchase amount: $68.00
Total payable from all purchases: $288.45
Total discount applied to all purchases $14.55
The application should be user-friendly by displaying appropriate welcome and exit messages. The following classes and methods could be used.
public class Customer
{
//declare constants
//declare fields/attributes to store the name and purchase amount
// constructor
// Accessor, mutator methods (get and set )
// Method to calculate total payable applying discount.
}
public class CustomerTest
{
//declare constants required public static void main(String[] args)
{
//create object
//Loop through taking user input for name and purchase amount and use set methods
//calculate total payable using the defined method
// compute other required values
//print output as shown in the example
}
}
Note: Once you complete coding and testing, go through the marking criteria to ensure that your application meets all the requirements. Avoid any sort of plagiarism.
What to submit
You should submit online the following files:
name, course code, UML diagram for the Customer class, and test results (screenshots/test cases with results to show that your application is correctly working)).
Assessment marking criteria
Total Marks – 20 Marks Allocated
1 Variables, constants and types
Declaring and using variables and constants 1
2 Objects and classes
Creating/declaring classes and using objects and methods 2
3 Loops
Using loops and conditions 1
4 If statements
Using if statements and conditions 1
5 Methods
Declaring and using main method 1
Declaring and using other methods 2
6 Inputs and Outputs
Reading and displaying data 1
Applying discount and calculating total Payable for each customer 1
Computing and displaying summary of purchases 3
7 Overall logic and program
Program logic 1
Spacing and indentation conventions 1
Naming conventions 1
Comments 1
User-friendly (welcome and exit messages) 1
8 Report
UML diagram 1
Test results 1
9 Penalties
Penalty for submission of incorrect files including names and formats is 2 marks
Penalty for using things not covered in weeks 1-6 of this course is 3 marks
Penalty for late submission is 5%/day
Plagiarism: penalty will be applied as per policy
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Click Here to Place order

Popular Posts

  • A “criminal minds” Aileen Wournos individual will be your “patient”
     A “criminal minds” Aileen Wournos individual will be your “patient”  A brief history of the patient including diagnoses (documented or your...
  • CEO Jane Lionel has some hard decisions to make with regard to some of the company’
     CEO Jane Lionel has some hard decisions to make with regard to some of the company’solder hands, and even on the eve of that decision, I be...
  • Problem in Supply Chain
    Problem in Supply Chain Problem 2. (Chapter 11: The Storage and Handling System) Compare the constrast private ownership of storage space to...

Recent Posts

Unordered List

Pages

  • Home

Text Widget

Blog Archive

  • November 2022 (20)
  • October 2022 (50)
  • September 2022 (119)
  • August 2022 (107)
  • February 2022 (501)
  • January 2022 (443)
  • December 2021 (488)
  • November 2021 (1574)
  • October 2021 (28)
  • September 2021 (11)
  • July 2021 (8)
  • June 2021 (15)
  • May 2021 (39)
  • April 2021 (15)
  • March 2021 (303)
  • February 2021 (712)
  • January 2021 (903)
  • December 2020 (2)
  • September 2020 (33)
  • April 2016 (5183)
  • March 2016 (3763)
  • February 2016 (4356)
  • January 2016 (1749)
  • December 2015 (22)
  • November 2015 (147)
  • October 2015 (23)

Sample Text

Copyright © STUDYSHIELDS ASSIGNMENT HELP | Powered by Blogger
Design by Hardeep Asrani | Blogger Theme by NewBloggerThemes.com | Distributed By Gooyaabi Templates