Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab 4- Order Processing (in class) CSCI 251 Problem Statement Design a program to simulate the order processing of a hardware store. To fill an

image text in transcribed
Lab 4- Order Processing (in class) CSCI 251 Problem Statement Design a program to simulate the order processing of a hardware store. To fill an order, workers place items on a conveyor belt to be scanned. Each item has a UPC code that designates the name of the item and its price. The worker enters "Done" to complete an order The computer system scans the UPC code of each item, records its price and creates a bill at the end of the order Input Data Name of each item Price of each item Output Data A bill with o Names of the items o Prices of the items o Number of items checked out o Subtotal, tax, and total price of this order Getting Started 1. In Command Window type edit order yourLastName.m. You will be prompted that the file does not currently exist; select okay. MATLAB will open the file in the editor. Include header comments formatted as show below: 2. % Course: CSCI 251, Section X % Student Name: Jane Doe % Student ID: 12345678 %Lab 4 in class % Due Date: % In keeping with the Honor Code of the School of Engineering, I have neither % given nor received assistance from anyone other than the instructor. % Program Description Algorithm 1. Clear the Command Window and Workspace windows 2. Print out a header as shown in the sample output (This order-processing program simulates using a code reader to scan an item and create an invoice.) 3. Prompt for the name of the first item, initialize count and subtotal variables. 4. Using a while-loop, compare item name with Done, if it's not done, then continue to scan the name and price of each item until the user enters "Done or "done 5. In each iteration, increment count and subtotal variables. 6. Use fprintf to output number of items checked out, subtotal, tax, and total price. Lab 4- Order Processing (in class) CSCI 251 Problem Statement Design a program to simulate the order processing of a hardware store. To fill an order, workers place items on a conveyor belt to be scanned. Each item has a UPC code that designates the name of the item and its price. The worker enters "Done" to complete an order The computer system scans the UPC code of each item, records its price and creates a bill at the end of the order Input Data Name of each item Price of each item Output Data A bill with o Names of the items o Prices of the items o Number of items checked out o Subtotal, tax, and total price of this order Getting Started 1. In Command Window type edit order yourLastName.m. You will be prompted that the file does not currently exist; select okay. MATLAB will open the file in the editor. Include header comments formatted as show below: 2. % Course: CSCI 251, Section X % Student Name: Jane Doe % Student ID: 12345678 %Lab 4 in class % Due Date: % In keeping with the Honor Code of the School of Engineering, I have neither % given nor received assistance from anyone other than the instructor. % Program Description Algorithm 1. Clear the Command Window and Workspace windows 2. Print out a header as shown in the sample output (This order-processing program simulates using a code reader to scan an item and create an invoice.) 3. Prompt for the name of the first item, initialize count and subtotal variables. 4. Using a while-loop, compare item name with Done, if it's not done, then continue to scan the name and price of each item until the user enters "Done or "done 5. In each iteration, increment count and subtotal variables. 6. Use fprintf to output number of items checked out, subtotal, tax, and total price

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago