Hi everybody, i really need your help, im not good at designing pseudocodes but i need someone to help me out in making this pseudocode for my assignment.. here is my assignment :

The Micah-11 hardware outlets require an inventory control program that is to accept order details for an item, and update it into the inventory database. The program should be interactively conducting a dialogue on the screen for the input values. The program is to get the input details, calculate product’s quantity on hand and display them on the screen.

Initialization
User inputs two products’ item number, product description and their initial quantity on hand. If an item number does not have precise five digits number range from ‘10001’ to ‘20000’, an error message is to appear on the screen and request for a new input value.

Order process
User enters the item number to search for the product information and the initial quantity on hand. The system will receive the order quantity and update it into the inventory database.
If the quantity on hand is zero, the message “Out of stock” is to appear on the screen.
If the quantity on hand is sufficient to meet the order (order quantity <= quantity on hand), one line is to be printed on the screen.
The requested product is out of stock.

If the quantity on hand is sufficient to meet the order (order quantity <= quantity on hand), one line is to be printed on the screen.
The inventory order was updated successfully.

If the quantity on hand is insufficient to meet the order (order quantity > quantity on hand), the order is to be filled partially by whatever stock is available. As the result, the quantity on hand will become zero instead of negative value. For this situation, a message “Order partially fulfilled” should appear on the screen.
The inventory order was partially fulfilled.

Your program is to continue to process inventory orders until a value of ‘-1’ is entered for the item number. None of the other entry details will be required after the value ‘-1’ has been entered.
Your final solution should contain:
• A pseudocode algorithm OR
• A flowchart algorithm

THAT WAS MY ENTIRE ASSIGNMENT QUESTION... PLEASE HELP!!

Dani AI

Generated

Following ’s advice to split the task, the solution is naturally two parts: initialization (read two product records with validation) and a sentinel-driven order loop that ends when -1 is entered for the item number. The pseudocode below uses a small inventory array of two records, enforces the five-digit item-number range 10001–20000, avoids negative inventory (partial fills set stock to zero), and includes a safe “item not found” branch that the original brief didn’t spell out.

Notes before the code: validate item numbers on entry (re-prompt until valid); validate quantities (non-negative); check the sentinel (-1) immediately when asking for an order item number so no further inputs are requested after quitting. This follows forum homework guidance from and the expectation noted by that some student effort should accompany any posted solution.

DECLARE inventory[2] AS RECORD { itemNumber, description, qtyOnHand }

-- Initialization: collect two product records
FOR i FROM 1 TO 2
    REPEAT
        PROMPT "Enter item number (5 digits between 10001 and 20000):"
        READ item
        IF item < 10001 OR item > 20000 THEN
            PRINT "Invalid item number; re-enter."
        END IF
    UNTIL item >= 10001 AND item <= 20000
    inventory[i].itemNumber = item

    PROMPT "Enter product description:"
    READ inventory[i].description

    REPEAT
        PROMPT "Enter initial quantity on hand (>= 0):"
        READ q
        IF q < 0 THEN
            PRINT "Quantity cannot be negative; re-enter."
        END IF
    UNTIL q >= 0
    inventory[i].qtyOnHand = q
END FOR

-- Order processing loop (sentinel -1)
WHILE TRUE
    PROMPT "Enter item number to order or -1 to quit:"
    READ orderItem
    IF orderItem = -1 THEN
        BREAK
    END IF

    index = FIND index WHERE inventory[index].itemNumber = orderItem
    IF index = NOT_FOUND THEN
        PRINT "Item not in inventory."
        CONTINUE
    END IF

    IF inventory[index].qtyOnHand = 0 THEN
        PRINT "Item currently out of stock."
        CONTINUE
    END IF

    PROMPT "Enter order quantity:"
    READ orderQty
    IF orderQty <= inventory[index].qtyOnHand THEN
        inventory[index].qtyOnHand = inventory[index].qtyOnHand - orderQty
        PRINT "Order processed; inventory updated."
    ELSE
        PRINT "Order partially fulfilled; remaining stock used."
        inventory[index].qtyOnHand = 0
    END IF
END WHILE

-- Optional: print final inventory summary
FOR EACH item IN inventory
    PRINT item.itemNumber, item.description, item.qtyOnHand
END FOR

This compact pseudocode is ready to be translated into any programming language; implementing it and posting the attempted code is the usual next step for targeted feedback.

Recommended Answers

All 3 Replies

Pseudocode is just a formalized list of steps, there really aren't any rules beyond generally trying to remain consistent and logically sound.

So your job is to break the assignment into component parts. What steps are involved? What order are the steps in? For example, it's not unreasonable to have user input as the first step because that kicks everything off. So what happens after user input? You need to organize the cause and effect of this program in your mind, then formalize it into steps. Those steps can then be further formalized into pseudocode or a flowchart.

By the way, our homework rule states that you must provide some proof of effort. Just plopping your assignment down and expecting any kind of meaningful help is both nonsensical and a violation of our rules.

Please just provide me the pseudocode... plzz plz plzz

commented: Do your own homework -2

Ì don't think this is the right website for you if you want people to "provide" you the code. If you can't even attempt at trying to solve the problem, you should switch majors.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.