View the step-by-step solution to:

Pseudocode Why use Pseudocode?

Chocolate Delights Candy Company manufactures several types
of candy. Design a fl owchart or pseudocode for the following:


a. A program that accepts a candy name (for example,
“chocolate-covered blueberries”), price per pound, and
number of pounds sold in the average month, and displays
the item’s data only if it is a best-selling item. Best-selling
items are those that sell more than 2000 pounds per
month.

Be sure to submit this in proper psuedocode and computer programming code format including all the required sections of psuedocode (housekeeping, main loop, end of job tasks). Present this assignment in a powerpoint flowchart with the computer code written as the sample diagrams (slide 41 example) are in the attached file. The final product should fit on either one or two powerpoint slides, with a similar format to slide 41 of the attached file.

The attached Powerpoint explains how to properly write all three sections of psuedocode, which is a requirement of this exercise.

This exercise is very simple in reality. The company is asking you to read an existing file containing the candy sales for a month. If a candy sells more than 2000 pounds, you are to print the candy name, price per pound, and pounds sold. It's just that simple. Because it is a report, you also need a report headings plus column headings. Be sure to follow these requirements explicitly.
1. You are to be reading an existing file, therefore there is no "INPUT" command and no "QUIT" value to stop the process.

2. In reading an existing file, you must inlcude a DO WHILE NOT EOF command to read all the record in the file. Otherwise we only read the first data record.

3. When printing headings, which are necessary in any report so we know what data we are looking at, we put all three fields in one heading line. Everytime a PRINT command is executed, another line is printed, so we would say:

Heading2 = "Candy Name Price Per Pound Pounds Sold"
Print Heading2

4. Do not use an ELSE command as there is no action necessary if a data record does not meet the test condition of "if lbssold > 2000". If it does not test true, we just skip that data record and read the next one.
Pseudocode
Background image of page 01
Why use Pseudocode? We have two design tools to help layout our program logic Flowcharts (pictorial representation) Pseudocode (textual representation)
Background image of page 02
Show entire document
Sign up to view the entire interaction

Top Answer

Let me explain the... View the full answer

7248046.pptx

FLOWCHART AND
PSEUDOCODE
Start
Read c_name,price,no_pounds
If(b_s<=2000) then
Print c_name,price,no_pounds
Else
Exit
Stop

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online