Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

home / study / engineering / computer science / computer science questions and answers / design a raptor flowchart to handle the following: you have

home / study / engineering / computer science / computer science questions and answers / design a raptor flowchart to handle the following: you have an items file containing an item ... Question: Design a raptor flowchart to handle the following: You have an items file containing an item code... Design a raptor flowchart to handle the following: You have an items file containing an item code, description, and the quantity on hand. In a prices file, you have the item code and the associated price. All items are in the price file but only the items we have in stock are in the inventory file. Each field of both files is on a separate record. Read the items file and find the matching record from the prices file. When a matching record is found, the following report line should be written to an output CSV (comma separated variable) file. Items without a matching price record should be written to the output with a price and value of zero. grocery code, description, price of item , quantity on hand, total value ( calculated as price * quantity ). Read all of the records from the prices file into a two-dimensional table, and then read each item file "record" one at a time and match them (allow for the possibility that no match exists) to the prices table. Assume the files are both in ascending sequential order ( small to large ). A two-dimensional array should be used to hold the prices file contents. Each row of the array will hold a prices record, column one will be the item number, and column 2 will be the price for that item. Don't limit the size of the prices array There may be more than five records in the files. The item file should be read and matched, one item at a time, i.e. not loaded into a table. Procedures needed to load the price file into a table, read a single item record, creating an output record. Basic competencies: proper processing for the End_Of_Input condition while reading both files; proper reading of the files to find a match as appropriate, proper matching of the grocery code keys. Hints: One file,the prices file should be read and stored in an array before trying to redirect and read the items file. With each field in a separate record, a get must be issued for each field, and each get preceded by an End-Of_Input test must be made. A named constant COMMA will help format your output record. Also, redirect your output to a file, called report.csv, separate your output fields with a comma, and output an initial record containing code, description, price, on-hand, total value. The output file can then be opened with Excel. I am including a couple output files for your testing. Use the redirect_input(yes) and place these files in the same folder as your rap file. I will test your flowchart using these two files to grade them, so you need to verify you can successfully run with them before submitting your flowchart. Hint, both files do not contain the appropriate number of records at the end. Your output file should appear similar to this in Excel Code Description Price On-hand Value 1 Java Made 10 5 50 3 Head First Ajax 3.50 1 3.50 5 HTML5 Cookbook 0 0 0 6 Test Driven Development 0 2 0 7 unknown 0 0 0 End of Report

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

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions