Reference no: EM132274244
Problem Specification:
Write a C# application program using only one class containing the Main() method to develop an application program for a cashless store. You must develop your program based on the given system requirement specifications. (A system requirement specificationestablishes the basis for an agreement between customers and contractors or suppliers on how the software product should function.) In this particular application, the system requirement specifications are as follows:
The cashierwill process n items from a number of customers (>0), one by one, in turn,
The cashier will prompt for the name of the item and the price of that item,
o The price of the item must be > 0,
o The name of the item should not be >= 8 characters,
The final invoice must be in a readable format and should include:
Total number of items purchased.
Total cost of all the items.
The customer is given discount on the purchases based on the following rules:
If customer's total of the purchases is less than $100
No discount is applied on the invoice.
If the total is between $100 and $300 (inclusive);
A discount of 1.5% is applied on the invoice.
If the total is greater than $300,
A discount of 2.5% is applied on the invoice.
Your application should validate all the inputs from the cashier.
I. If the cashier enters invalid inputs for the name and the price, the program should ask the cashier to re-enter the inputs as necessary by providing appropriate messages to the cashier.
II. The application software must be designed using sentinel event-controlled loops for both the number of items and the number of customers.
The customer should pay only by using a credit card.
I. The application program should validate the customer's credit card,
a. Ask the user to enter a four-digit card number and check if it is valid. The number is valid if the fourth digit is the remainder when the number represented by the first three digits of the four-digit number is divided by 7. For example, 7770 is valid, as 0 is the remainder when 777 is divided by 7.
b. If the credit card is valid, then the payment is accepted.
c. The invoice should indicate that the total amount is paid with $0.0 owing.
In developing your program, please take note of the following:
I. You are not to use any data structure, such as arrays or lists.
II. You should not use any C# concepts which have not been not been taught as part of Lectures and Tutorials in Weeks 1 to 4.
III. You should develop your application using simple logic.
IV. Test your code using your own test data covering multiple data sets.
V. Your program should not have any compilation/execution errors.