The Furry Friend Pet Store needs a COBOL program to create a report on the numbe
ID: 3679375 • Letter: T
Question
The Furry Friend Pet Store needs a COBOL program to create a report on the number of pets sold in the store. The Furry Friend Pet store has four types of animals: cats, dogs, birds and fish. The input to the program will contain the following information:
COLUMNS DATA
1 Type of Pet Sold (1 - Cats, 2 - Dog, 3 - Bird and 4 - Fish)
2 - 6 The cost of the Pet to the Store
7 - 11 The Selling Price of the Pet
12-80 Blank
The input records have already been sorted by Pet Type. When creating test cases for your program be sure to keep the test cases in sorted order. The first test case record will be cats (Type 1). Please have more than one test case for each pet. Your program will read in all input records. When the input records for a particular pet, for example, Cats (Type 1), have been completed, print a summary report line for the total pet sold. A sample input instream file is shown below.
10010000200
10020000400
20100002000
20040000500 etc.
The student will decide on the length of each field in the output record as well as the edit characters to place in these fields. The output record will contain the following information:
PET REPORT
PET TYPE NUMBER TOTAL TOTAL SELLING PROFIT
SOLD COST PRICE
CATS
DOGS
BIRDS
FISH
Explanation / Answer
PROFIT
SELLING PRICE
IDENTIFICATION CATEGORY.
PET REPORT
PET TYPE NUMBER TOTALSOLD TOATL COST SELLING PRICE.
PET TYPE
NUMBER SOLD
TOTAL COST
SELECT PET REPORT ASSIGN TO "PET REPORT.DAT"
STORE IS LINE SEQUENTIAL.
SELECT PET TYPE ASSIGN TO "PET REPORT.RPT"
STORE IS LINE SEQUENTIAL.
DATA SECTION.
FILE SECTION.
FD PET STORE.
01 CATS
02 BIRDS
03 DOGS
04 FISH
FD SALE TYPE STOP RUN.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.