A retail store gives each of its customers a maximum amount of credit. A customer’s available credit is determined by subtracting the amount of credit used by the customer from the customer’s maximum amount of credit. As you did in programming challenge 1, perform steps 1 through 6 of the programming process to design an application that determines a customer’s available credit.
Steps 1-6 1. Clearly define what the application is to do. 2. Visualize the application running on the computer and design its user interface. 3. Make a list of the controls needed. 4. Define the values of each control’s properties. 5. Make a list of methods needed for each control. 6. Create a flowchart or pseudo code version of each method.
Algorithm
1. Display message:”Please enter customers name” 2. Enter customers name 3. Store customers name as a variable. 4. Enter customers maximum amount of credit, m. 5. Store max amount in memory. 6. Enter the amount of credit used, u. 7. Store credit used in memory. 8. Subtract amount used from maximum, m – u = r 9. Display remaining credit, r.
Step 1. Describe the following characteristics of this application: Purpose –to calculate the customer’s available credit Input – Amount of credit used, maximum credit. Process- Subtract the amount of credit used from the maximum credit and the result is the available credit. Output- displays a message indicating the customer’s available credit.
Step 2. Draw a sketch of the applications form and place all the controls that are needed.
Customers Name
Maximum Amount of Credit received
Amount of Credit Used