Question: pseucode logic 3 I need pseudocode for logic 3 Workshop Details Applications of vending machines essentially have two major logical components to define: 1. Hardware
pseucode logic 3


I need pseudocode for logic 3
Workshop Details Applications of vending machines essentially have two major logical components to define: 1. Hardware States (physical interface) 2. Software Logic (main functional logic/controller) States Hardware states are triggered by the software layer that implement the overall system process. The system has at least 6 main states (or modes): 1. Power-On 2. Power-Off 3. Idle/Ready (stand-by: waiting for customer) 4. Active (customer interaction building an order) 5. Payment (final step in customer transaction) You define these 6. Cancel (cancels the session at any time during states 4&5 ) For each of these states, both the hardware and software components will have their own set of defined processes. Data Structures Use the following data structures in your solution: Product slotID // Unique location slot ID (physical placement in the machine ex: "D8") sku // Unique product identifier quantity // Actual quantity available (physically in machine at the given slotID) maxQuantity // Maximum machine qty that can be stocked for the slotID minQuantity // Re-order when this qty is reached (based on: maxQuantity - quantity) price // vending machine price to charge customer per unit description // Product name Note: The term "Inventory" is simply a collection/array of Product data Page | 1 [Logic 1] Hardware States \& Software Idle State Hardware components have only two possible states: "enabled" or "disabled" As the machine changes from one state to another, the various hardware components need to be initialized to the new state and should be set to complement the initial state of the software logic (example: disable controls that don't apply to the current state and only enable those that should be) - The software logic will modify/change the hardware components as needed after the initialization of the hardware is set to the new state For each vending machine state, create the necessary initial hardware settings - Define each hardware component's state (enabled or disabled) - Each hardware component should be described in its own step/process - You should have 4-sub-processes in total (one for each vending machine state) Hint: The software logic layer will "call" the hardware processes when initializing to a new (ex: "A" button + " 9 " button) - After selecting a slot (product), you can enter a quantity from 1-9 followed by the Enter key. The Correct button can be used to erase the quantity before the Enter key is pressed. - A product selection can only become a transaction if the requested quantity for the item is in-stock (has inventory) - Multiple transactions can be added to the session by entering a series of products one selection after another - Itemized on-screen session transaction details should be displayed - Using the Pay button will indicate the end of the transactional session - Create two separate sub-processes: Active and Cancel (states) that cover the software logic involving the creation of a session with transactions (product selection), entering item quantities, correcting inputs, and cancelling the session. [Logic 3] Acceptable Payments \& Product Inventory (Payment and Cancel states) 1. Credit card, 2. Bank card 3. NFC phone 4. Vending machine phone application $ NO CASH $ Following a successful payment, inventory must be adjusted in real-time (hint: local and remote data) Inventory minimum stock levels must be enforced (if the quantity in-stock reaches the minimum stock level set for that product's row \& column location, more products should be ordered Dispense the items only after payment is successful Create two separately sub-processes: Payment and Cancel (states) that cover the software logic involving payment, inventory adjustments, dispensing the items, and cancelling the session
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
