Question: Each part of this lab will use the same input file, named lab3-in.dat. This file will be located in the same directory as the executables

 Each part of this lab will use the same input file,

named lab3-in.dat. This file will be located in the same directory asthe executables (do not specify a path for the file in the

Select statements). This file is a roster for a children's band. The

Each part of this lab will use the same input file, named lab3-in.dat. This file will be located in the same directory as the executables (do not specify a path for the file in the Select statements). This file is a roster for a children's band. The record format for the file is as follows: Field Description First Name Gender Instrument Length 12 1 15 Data Type String String String The end result of each part of this assignment is the same. You will be given different programming specifications in each, to force you to use some of the different statements and concepts we have discussed recently. If some aspect of a program does not have specifications dictating how to accomplish that part, then you are free to use whatever approach you wish. Each program is a hybrid of batch and interactive. The input is coming from a file, but the output will be going to the console window, there is no output file. The programs will determine how many children play instruments that fall into specific categories. These categories, and instruments in each, are (note the proper case): Brass: (Bugle, Flugelhorn, Sousaphone, Trombone, Trumpet, Tuba) Percussion: (Bass Drum, Bells, Bongos, Castanets, Chimes, Cymbals, Snare Drum, Xylophone) String: (Banjo, Bass, Cello, Guitar, Harp, Lyre, Mandolin, Violin) Woodwind: (Bagpipes, Bassoon, Clarinet, Flute, Oboe, Piccolo, Saxophone) Other: Anything else The output should consist solely of category names and counts, nicely formatted. Allow 3 digits for each count. This will seem like more work than it is; a lot of the code amongst each part are the same so there are plenty of copy-and-paste opportunities. Part A You will create an OpenCOBOL program, named lab3a.cob, that will generate the desired counts adhering to the following specifications: Use a condition name to denote and check for the end of file. Use Set to manipulate the end of file variable Use condition names and If statements to determine in which category each instrument belongs Part B You will create an OpenCOBOL program, named lab3b.cob, that will generate the desired counts adhering to the following specifications: Use an Evaluate statement without condition names to determine in which category each instrument belongs Part C You will create an OpenCOBOL program, named lab3c.cob, that will generate the desired counts adhering to the following specifications: O The program will initially prompt the user to provide (from the keyboard) the number of records in the file (the sample file has 68 records). Allow for a 3-digit record count. o Repeat prompting the user for a record count until the user provides a non- negative value You are free to assume that the user will not provide a record count that exceeds the number of records in the file You are free to assume the user will only provide numeric values Instead of checking for the end of file, use the Perform Times loop with the value provided by the user as the limit Use If statements without condition names to determine in which category each instrument belongs O Part D You will create an OpenCOBOL program, named lab3d.cob, that will generate the desired counts adhering to the following specifications: O The program will initially prompt the user to provide (from the keyboard) the number of records in the file (the sample file has 68 records). Allow for a 3-digit record count. O Repeat prompting the user for a record count until the user provides a non- negative value You are free to assume that the user will not provide a record count that exceeds the nu per of records in the file You are free to assume the user will only provide numeric values Instead of checking for the end of file, use the Perform Varying loop with the value provided by the user as the limit Use condition names and an Evaluate statement to determine in which category each instrument belongs O

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!