Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

***IN C#*** CIS162AD Programming Assignment 6 Assignment Goal: In this chapter you learned about loops. Loops allow processing on large sets of data. They are

***IN C#*** CIS162AD Programming Assignment 6 Assignment Goal: In this chapter you learned about loops. Loops allow processing on large sets of data. They are paramount for processing files. Assignment Specifications: Write a program called CalculateInvoice that allows a user to enter multiple invoice items for multiple customers and calculates a total invoice amount. For each customer, enter a customer number and customer name. Then, for each customer allow the user to enter any number of items. Data to be entered for each item is the description, quantity, and price. For each item calculate the extended amount by multiplying the quantity times the price. Add each extended amount to a subtotal for the customer. If the subtotal is greater than or equal to $500, the customer gets a 5% discount. Calculate a sales tax of 8.25% on the subtotal less the discount. Display the customer number and name on the first line, followed by the subtotal, the amount of discount, amount of sales tax, and total invoice amount. You are not to list the individual items. Hint: You will need two loops for this assignment, an outer loop for multiple customers and an inner loop for multiple items. Because you have multiple customers, you need to clear (set to zero) all fields used to store customer level totals) in order to prevent values from carrying over to the next customer. For your test data, you should have at least two customers. Each customer should have at least two items. One of the customers should have an invoice subtotal equal to or greater than $500 to test your discount. Deliverables (what you are to submit): A planning document Program outline Data items Sample output Testing criteria Your complete project folder in zip format CIS162AD Programming Assignment 6 Name: _____________________________________ Program Outline: < This is an outline of what your program is to do. Be detailed. > This program will calculate the invoice total for customers after they enter their items, and get their discounts( if applicable). Methods: < This is a list of methods you will define in your program. > Function Access Modifier(1) Method Name Parameters (dataType identifier) Return Type (2) Main method: public static main() void Note: Main() is the only method in this program. 1. Access Modifier: local, public, private, protected 2. Return Type: void, string, char, byte, short, integer, long, double, float, boolean, object, etc. Data Items: < This is a list of fields (variables, constants, and objects you will need. > Data Item Source (1) Access Modifier (2) Data Type (3) Identifier Notes subtotal calculated local float subTotal discount calculated local float discount tax calculated local float tax tax total calculated local float taxTotal customer name input local string customerName customer number input local float customerNumber item description input local string itemDescription item price input local string itemPrice item quantity input local float itemQuantity item name input local string itemName extended amount calculated local float extAmount invoice total calculated local float invoiceTotal 1. Source (where the data comes from): calculated, input, constant, parameter, instance, object 2. Access Modifier: local, public, private, protected 3. Data Type: string, char, byte, short, integer, long, double, float, boolean, object, etc. Sample Output: < What will the user see? > Enter customer number: 99 Enter Customer name: XXXXX Enter item name: XXXXX Enter item description: XXXXX Enter item quantity: XXXXX Enter item price: XXXXX Another item? Y or N: X Customer Number and Name: 99 XXXXX Subtotal: 99999 Discount: 99999 Sales tax: 99999 Total Amount: 99999 Test Data: < How will you prove your program works? > You should list all input and calculated variables under the "Identifier" column. You make up data for the input variables and then manually calculate the calculated variables. You should have at least two customers. Each customer should have at least two items. One of the customers should have an invoice subtotal equal to or greater than $500 to test your discount. Identifier Case 1 Case 2 Case 3 Case 4 Note: You made more or fewer test cases depending on your application.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Integration Services

Authors: Brian Knight, Devin Knight

1st Edition

1118850904, 9781118850909

More Books

Students also viewed these Databases questions

Question

1.Which are projected Teaching aids in advance learning system?

Answered: 1 week ago