0% found this document useful (0 votes)
4 views

Answers 1

The document outlines expected answers for a homework assignment involving input, process, output, and storage components for systems like an ATM and an online food ordering system. It also includes a flowchart for an item selection and vending machine process, detailing user interactions and conditions for dispensing items. The structure emphasizes user management, order processing, and delivery tracking in the context of food ordering.

Uploaded by

ansari.oumaima
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Answers 1

The document outlines expected answers for a homework assignment involving input, process, output, and storage components for systems like an ATM and an online food ordering system. It also includes a flowchart for an item selection and vending machine process, detailing user interactions and conditions for dispensing items. The structure emphasizes user management, order processing, and delivery tracking in the context of food ordering.

Uploaded by

ansari.oumaima
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Answers

Part 1

Expected Answers (Example Solution):

Component Example 1 Example 2


Input Barcode scanner Touchscreen (for selecting items)
Process System calculates total price System applies discounts and tax
Output Digital receipt on screen Printed receipt from the machine
Storage Database of scanned items Purchase history stored for records

Homework:

Expected Answers (Example Solution):

Componen Example 1 Example 2


t

Input ATM card reader Keypad (PIN entry,


amount selection)

Process System verifies account System deducts money


balance for withdrawal

Output Screen displays balance and Cash dispenser releases


messages money

Storage Transaction history stored in ATM records machine


bank database activity logs

Part 2

Online Food Ordering System

├── User Management

│ ├── User Registration/Login

│ ├── Profile Management

│ ├── Payment Information

├── Restaurant Management

│ ├── Add/Edit Menu Items

│ ├── Manage Orders

│ ├── Update Restaurant Availability


├── Order Processing

│ ├── Cart System

│ ├── Payment Processing

│ ├── Order Confirmation

└── Delivery Tracking

├── Assign Delivery Person

├── Real-Time Tracking

├── Delivery Confirmation

Part 3

BEGIN

DISPLAY "Select an item: 1. Chips ($2) 2. Chocolate ($3) 3. Soda ($1.5)"

READ itemChoice

IF itemChoice = 1 THEN

price ← 2

ELSE IF itemChoice = 2 THEN

price ← 3

ELSE IF itemChoice = 3 THEN

price ← 1.5

ELSE

DISPLAY "Invalid selection"

END

DISPLAY "Insert money:"

READ moneyInserted

IF moneyInserted >= price THEN

DISPENSE itemChoice

CHANGE ← moneyInserted - price

IF CHANGE > 0 THEN


DISPLAY "Your change: ", CHANGE

ENDIF

DISPLAY "Enjoy your snack!"

ELSE

DISPLAY "Insufficient funds. Insert more money or cancel."

ENDIF

END

You might also like