Question

In: Computer Science

Design a program using a flowchart or pseudocode that accepts a person’s loyalty card number and...

Design a program using a flowchart or pseudocode that accepts a person’s loyalty card number and amount spent in the store last month. Display the data only if the customer is a high spender – a person who spent more than $1000 in the store.

A program that accepts customer info continuously until a sentinel value is entered and displays a list of high spenders.

Solutions

Expert Solution

PseudoCode:

while(1) {
  exitProgam = false
   print("Do you want to check if a person is high spender? (y/n)")
   List listOfHighSpenders; //list of high spenders
   input = read()
   switch(input) {
       case "y": print("Enter the person’s loyalty card number")
               card_num = read()
               print("Enter the amount spent in the store last month")
               amount_spent = read()
               //check if the person spent more than 1000
               if(amount_spent > 1000)
                   listOfHighSpenders.add(card_num)
               break;
      
       case "n": exitProgam = true
               break;
//wrong input
       default: print("Please enter y or n")
   }

//To stop taking input from the user if thte input is "n"
   if(exitProgam)
       break;
}

//Displaying the high spenders
for(spender_card_num in listOfHighSpenders) {
   print(spender_card_num)
}


Related Solutions

DESIGN A FLOWCHART IN FLOWGORITHM AND WRITE THE PSEUDOCODE Number Analysis Program Design a program that...
DESIGN A FLOWCHART IN FLOWGORITHM AND WRITE THE PSEUDOCODE Number Analysis Program Design a program that asks the user to enter a series of 20 numbers. The program should store the numbers in an array and then display the following data: The lowest number in the array. The highest number in the array. The total of the numbers in the array. The average of the numbers in the array. PLEASE AND THANK YOU
create flowchart using Flowgorithm and Pseudocode for the following program example:   Design a program for Jones...
create flowchart using Flowgorithm and Pseudocode for the following program example:   Design a program for Jones College. The current tuition is $12,000 per year, and tuition is expected to increase by 5 percent each year. Display the tuition amount for each year over the next five years (use a looping structure).
DESIGN A FLOWCHART IN THE APPLICATION FLOWGORITHM Exercise called: Number Analysis Program Design a program that...
DESIGN A FLOWCHART IN THE APPLICATION FLOWGORITHM Exercise called: Number Analysis Program Design a program that asks the user to enter a maximum of 20 numbers. The program should store the numbers in an array and then display the following data: 1-The lowest number in the array. 2-The highest number in the array. 3-The total of the numbers in the array. 4-The average of the numbers in the array. PLEASE AND THANK YOU
Write a Python program that: Create the algorithm in both flowchart and pseudocode forms for the...
Write a Python program that: Create the algorithm in both flowchart and pseudocode forms for the following requirements: Reads in a series of positive integers,  one number at a time;  and Calculate the product (multiplication) of all the integers less than 25,  and Calculate the sum (addition) of all the integers greater than or equal to 25. Use 0 as a sentinel value, which stops the input loop. [ If the input is 0 that means the end of the input list. ]...
6. Write a program in C programming (compile and run), a pseudocode, and draw a flowchart...
6. Write a program in C programming (compile and run), a pseudocode, and draw a flowchart for each of the following problems: a) Obtain three numbers from the keyboard, compute their product and display the result. b) Obtain two numbers from the keyboard, and determine and display which (if either) is the smaller of the two numbers. c) Obtain a series of positive numbers from the keyboard, and determine and display their average (with 4 decimal points). Assume that the...
Draw a structured flowchart or write pseudocode that describes the process of guessing a number between...
Draw a structured flowchart or write pseudocode that describes the process of guessing a number between 1 and 100. After each guess, the player is told that the guess is too high or too low. The process continues until the player guesses the correct number. Pick a number and have someone try to guess it by following your instructions. Submit the flowchart or pseudocode and the results of your test. Create a python program based on your flowchart or pseudocode....
Amanda’s Sweatshirt Shoppe wants several lists of salesperson data. Design a flowchart or pseudocode for the...
Amanda’s Sweatshirt Shoppe wants several lists of salesperson data. Design a flowchart or pseudocode for the following: A program that accepts: one salesperson’s name number of sweatshirts sold in the last month Calculation: Each sweatshirt sells for $30 Calculate the total value of the sweatshirts that were sold The program displays: the salesperson’s name number of sweatshirts sold total value of the sweatshirts that were sold the message, “ High Performer”, only if the salesperson is a high performer—defined as...
Develop an Algorithm and java program using Design Recipe for the following problems. Draw a flowchart...
Develop an Algorithm and java program using Design Recipe for the following problems. Draw a flowchart to compute the largest and smallest of 4 numbers : Write a Java Program for the above flowchart, use methods(functions), and nested if-else statements. Take input from the user using the Scanner object. Use separate methods to compute the Largest and Smallest of the numbers. Method 1 Name: findLargest(param 1, param 2, param 3, param 4) Method 2 Name: findSmallest(param 1, param 2, param...
Design a simple program, using pseudocode, to implement the recursive formula you found in part (a)...
Design a simple program, using pseudocode, to implement the recursive formula you found in part (a) to compute numbers in the Fibonacci sequence. Describe in detail how your program implements the recursive formula. You may find it useful to discuss how it through a concrete example such as F(8) = 21.
DESIGN A FLOWCHART IN THE APPLICATION FLOWGORITHM Exercise called: Number Analysis Program Requirement: Make two modules...
DESIGN A FLOWCHART IN THE APPLICATION FLOWGORITHM Exercise called: Number Analysis Program Requirement: Make two modules in function and two modules in regular mode that carry out the processes and print the particular result and two function modules where the results are printed in the main. Design a program that asks the user to enter a maximum of 20 numbers. The program should store the numbers in an array and then display the following data: 1-The lowest number in the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT