Question: Flowchart & basic pseudocode Black boxes are widely used and referred to in the world of programming. They represent specific processes that are hidden from

Flowchart & basic pseudocode

Black boxes are widely used and referred to in the world of programming. They represent specific processes that are hidden from the consumer (end-user, programmer, or conceptually by management etc.). In the programming sense, this can be a large-scale process (a system or application) or be as minute as a function (such as a shared Application Program Interface [API], or a web-service).

In the case of functions, each function should be limited to a very specific task. Although not

necessary, most of the time functions will require some input information and use that input to

produce some meaningful output (or result). This workshop is focused on function-based black boxes.

that do a very specific task and using those defined functions from a main overall process.

Reminder

Always start by using pseudocode to develop the detailed step-by-step process. Once you are

satisfied with your pseudocode solution, develop a flowchart.

A customer has several products in a shopping cart from a grocery store (perishable and nonperishable

products). The customer needs to pay for the items using the self-checkout option.

There are three (3) main sub-processes (black boxes) that occur:

1. Add non-perishable item to the order (has a SKU barcode)

2. Add perishable item to the order (no SKU barcode)

3. Payment

The entire checkout process needs to be defined. The main process should refer to the sub-processes (functions/black boxes) when and where possible.

Your Tasks

Using the Computational Thinking approach to problem solving:

1. Define the main overall process required using a self-checkout option at a grocery store.

2. Define the specific functions (black box) for each of the sub-processes. Be sure to determine what inputs might be required (if any) for it to do its task:

Adding item to order: Non-perishable

Adding item to order: Perishable

Payment

3. Refine the main overall process (from #1) so it refers to the defined sub-processes (black boxes)

where applicable (this should result in simplifying the main overall defined process).

4. In total, you should have four (4) defined sections of pseudo code (with complimentary flowcharts for each) that illustrate and communicate the defined entire solution.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!