Question

In: Computer Science

Design a program using pseudocode to produce a report showing recommended sale prices. The program should...

Design a program using pseudocode to produce a report showing recommended sale prices. The program should ask the user to enter the item number, last sale date, number of items on hand, current date, item cost and the regular selling price. The program will output the item number, last sale date, days elapsed, number of item on hand, item cost, regular selling price and sales price. If the item has not been placed on sale for the last 30 days, the discount is 10% If the item has not been placed on sale for the last 31 to 60 days, the discount is 20% If the item has not been placed on sale for the last 61 to 90 days, the discount is 40% If the item has not been placed on sale in over 90 days, the discount is 50%

how can answer this question in the easiest way and simple way possible

Solutions

Expert Solution

PSEUDOCODE:

This program is used to produce a report showing recommended sale prices.

FUNCTION CalcSale 
  Pass In:  item_number, last_sale_date, no_items_on_hand, current_date, item_cost,
  reg_selling_price
  COMPUTE days_elapsed as current_date - last_sale_date
  IF day_elapsed is greater than 90 then
    COMPUTE sales_price as reg_selling_price * .50
  ELSE day_elapsed is greater than 60 and less than or equal to 90 then
    COMPUTE sales_price as reg_selling_price * .60
  ELSE day_elapsed is greater than 30 and less than or equal to 60 then
    COMPUTE sales_price as reg_selling_price * .80
  ELSE 
    COMPUTE sales_price as reg_selling_price * .90
  ENDIF
  Call Function: DisplayOutput with item_number, last_sale_date, days_elapsed,
  no_items_on_hand, item_cost, reg_selling_price, sales_price
Endfunction

FUNCTION DisplayOutput
  Pass In: item_number, last_sale_date, days_elapsed, no_items_on_hand, item_cost, 
  reg_selling_price, sales_price
  PRINT "Item Number: ", item_number
  PRINT "Last Sale Date: ", last_sale_date
  PRINT "Days Elapsed: ", days_elapsed
  PRINT "Number of items on hand: ", no_items_on_hand
  PRINT "Item cost: ", item_cost
  PRINT "Regular Selling Price: ", reg_selling_price
  PRINT "Sale Price: ", sales_price
Endfunction
 
FUNCTION Main
  PRINT "Enter the item number, last sale date, number of items on hand,
  current date, item cost and the regular selling price: "
  INPUT item_number from the user
  INPUT last_sale_datefrom the user
  INPUT no_items_on_hand from the user
  INPUT current_date from the user
  INPUT item_cost from the user
  INPUT reg_selling_price from the user
  Call Function: CalcSale with  item_number, last_sale_date, no_items_on_hand, 
  current_date, item_cost, reg_selling_price
Endfunction


Related Solutions

Using pseudocode design a number guessing game program. The program should generate a random number and...
Using pseudocode design a number guessing game program. The program should generate a random number and then ask the user to guess the number. Each time the user enters his or her guess, the program should indicate it was too high or too low. The game is over when the user correctly guesses the number. When the game ends, the program should display the number of guesses that the user made.
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).
TOPIC: DESIGN A SALE WEBSITE Produce a report evaluating the effectiveness and application of interpersonal skills...
TOPIC: DESIGN A SALE WEBSITE Produce a report evaluating the effectiveness and application of interpersonal skills during the design and delivery process. You should also include an evaluation of your performance in this project and your contribution to the team you worked in. Also you need to discuss problem-solving and its importance in planning and running an event. You should include a discussion of various problem-solving techniques and justify the solution methodologies used during your project. You should also include...
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.
Using Pseudocode: Design a program that allows the user to enter 20 names into a String...
Using Pseudocode: Design a program that allows the user to enter 20 names into a String array. Sort the array in ascending (alphabetical) order and display its contents.
A customer in a store is purchasing two items. Design a program using module pseudocode that...
A customer in a store is purchasing two items. Design a program using module pseudocode that asks for the price of each item in dollars, and then displays three things in their output receipt - the subtotal of the sale in dollars, the amount of sales tax in dollars and the final amount paid by the customer in dollars. Assume the sales tax is 4 percent.
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
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.
Discuss with the class the importance of program design (using pseudocode and/or flowcharts) when designing programs...
Discuss with the class the importance of program design (using pseudocode and/or flowcharts) when designing programs utilizing selection structures.
A statistical program is recommended. Data showing the values of several pitching statistics for a random...
A statistical program is recommended. Data showing the values of several pitching statistics for a random sample of 20 pitchers from the American League of Major League Baseball is provided. Player Team W L ERA SO/IP HR/IP R/IP Verlander, J DET 24 5 2.40 1.00 0.10 0.29 Beckett, J BOS 13 7 2.89 0.91 0.11 0.34 Wilson, C TEX 16 7 2.94 0.92 0.07 0.40 Sabathia, C NYY 19 8 3.00 0.97 0.07 0.37 Haren, D LAA 16 10 3.17...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT