Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The system to be developed for Williams and Son needs to produce the following slip for a customer once the sale has been concluded. Please

The system to be developed for Williams and Son needs to produce the following slip for a customer once the sale has been concluded. Please note: For the purpose of this assignment, assume that a customer will only purchase one unit of each item. Q.2.1 Write the pseudocode that will produce a slip similar to the one illustrated at the beginning of the question. Your solution should satisfy the following requirements: ? The solution must illustrate the use of good programming practices; ? The solution must make use of a loop; ? The loop must make use of a sentinel value. (22) Q.2.2 The mainline logic of almost every procedural program consists of three parts namely housekeeping tasks, detail loop tasks and end-of-job tasks. By making use of flowcharts, show how these parts can be implemented in your solution for Question 2.1. (23) Q.2.3 All of your solutions should be structured. Explain why your solution can be considered a structured solution. (5) please help me with question 4

image text in transcribed
asked you to modify the system so that it can automatically calculate discount for the customer based on the total amount of their purchase. Mr. Williams has asked that the discount amount be indicated on the slip as well as the amount due by the customer after discount has been applied. Discounts are awarded based on the following criteria: Sales Amount Discount RO - R100 0% R101 - R150 5% R151 - R201 10% more than R201 15% Q.3.1 Make a copy of the pseudocode you created in Question 2.1. Then, modify the (30) pseudocode so that the solution will satisfy the following requirements: The solution should make use of a selection structure to determine the percentage discount that the customer is to receive. Once the percentage discount has been determined, the discount amount should be determined. The slip produced should be amended so that it shows the total purchase amount, the amount of discount the customer receives as well as the amount due by the customer after discount has been subtracted from the total purchase amount. The Independent Institute of Education (Pty) Ltd 2020 Page 5 of 6 18; 19;20 2020 Question 4 (Marks: 10) After a month or two Mr. Williams contacted you indicating that if they accidentlyenter a 5 combination of letters instead of the price of a product the system crashes. This should never happen. Q.4.1 Modify the while loop so that when a user enters a price, the system validates (10) whether the value entered is a numericvalue or not. If the value entered by the user is nota numericvalue, they should be asked repetitively to enter a new value until they enter the correct data type. Note: You only need to provide the modified while loop pseudocode as your answerto the question. [TOTAL MARKS: 100]

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

Students also viewed these Programming questions

Question

=+c. Assuming velocity remains constant,

Answered: 1 week ago

Question

1. Socialization policy in mass media?

Answered: 1 week ago

Question

1. What is employment? 2. What is the rewards for employment?

Answered: 1 week ago