Genius

COM/204 COM204 COM 204 Chapter 7 Programming Logic and Design, PART 2

COM 204 Chapter 7 Programming Logic and Design, PART 2

Programming Exercises

1.	The Vernon Hills Mail-Order Company often sends multiple packages per order. For each customer order, output enough mailing labels to use on each of the boxes that will be mailed. The mailing labels contain the customer- complete name and address, along with a box number in the form Box 9 of 9. For example, an order that requires three boxes produces three labels: Box 1 of 3, Box 2 of 3, and Box 3 of 3. Design an application that reads records that contain a customer- title (for example, Mrs.), first name, last name, street address, city, state, zip code, and number of boxes. The application must read the records until eof is encountered and produce enough mailing labels for each order.



2.	Boardman College maintains two files—one for Sociology majors and another for Anthropology majors. Each file contains students’ ID numbers, last names, first names, and grade point averages. Each file is in student ID number order. The college is merging the two departments into a Department of Sociology and Anthropology. Design the logic for a program that merges the two files into one file containing a list of all students, maintaining ID number order.


3.	Laramie Park District has files of participants in its summer and winter programs this year. Each file is in participant ID number order and contains additional fields for first name, last name, age, and class taken (for example, Beginning Swimming).
	
a. Design the logic for a program that merges the files for summer and winter programs to create a list of the first and last names of all participants for the year in ID number order.

	

b. Modify the program so that if a participant has more than one record, the participant- ID number and name are output only once.


c. Modify the library program so that if a participant has more than one record, the ID number and name are output only once along with a count of the total number of classes the participant has taken.


4.	The Apgar Medical group keeps a patient file for each doctor in the office. Each record contains the patient- first and last name, home address, and birth year. The records are sorted in ascending birth year order. Two doctors, Dr. Best and Dr. Cushing, have formed a partnership. 

a. Design the logic that produces a merged list of patients’ names in ascending order by birth year.

b. Modify the program so that it does not display patients’ names, but only produces a count of the number of patients born each year.


5.	The Martin Weight Loss Clinic maintains two patient files—one for male clients and one for female clients. Each record contains the name of a patient and current total weight loss in pounds. Each file is in descending weight loss order. Design the logic that merges the two files to produce one combined file in order by weight loss.


Answered
Other / Other
28 Oct 2016

Answers (1)

  1. Genius

    COM/204 COM204 COM 204 Chapter 7 Programming Logic and Design, PART 2

    Answer: A sample solution follows Flowchart: Pseudocode: start Declarations InputFile ****** ******
    To see full answer buy this answer.
    Answer Attachments

    1 attachments —

    • img
      part_2448176.docx

Report As Dispute

Share Your Feedback

Give Review : A+ A B C D F