write a program using simple loop, decision processing

Objective:  The purpose of this problem is to gain experience with the principles necessary to write a program using simple loop, decision processing, counters and accumulators

Save the Barns, a bi-partisan political action committee, needs a Contributions report to provide:

Summary information regarding the political affiliation and gender of the contributors

Input:  The input file will contain an unknown number of contributor records.  You will create your own data file to test your program.  Call your file contributers.dat. 

Assume all the data in the input file has already been validated.

The record format is:         

Field                                                       Type                                       Length

Contributor name                                                Character                              25

Address                                                  Character                              25

City                                                        Character                              15

State                                                       Character                              2

Zip                                                          Character                              5

Party (D, I, or R)                                  Character                              1

Gender (F or M)                                   Character                              1

Contribution                                         Numeric                                 7              ZZZ9.99

Total 80 spaces

 

Output:  The output will be to the screen.  Include headings that contain a company name, a report name, and date.  There will be 1 blank line after the report name line, followed by a summary report. 

 

The summary report should include record count, total contribution and average contribution for the following groupings: (Be sure to identify each number printed.)

1)       Men                                        7)  Democratic Women 

2)       Women                                  8)  Republican Men

3)       Democrats                            9)  Republican Women

4)        Republicans                         10) Independent Men

5)       Independents                       11) Independent Women

6)       Democratic Men                  12) Overall

 

Special processing:  Prompt the user to see if they want to only process this report for contributions over $500. If the response is yes, then change the report name appropriately and process only input records with contributions over $500. Otherwise process all the records.

Logic development includes the following.

                1) Hierarchy chart of the modules for this program

2) Program diagram or design document to list the Classes and objects for this program.

3) Create a Chapin Chart to show the detailed logic for this program.

4) Create a screen layout for the output.  (80 wide X 24 lines)

5) Create a Test Plan for this program.

   Related Questions in Programming Languages

©TutorsGlobe All rights reserved 2022-2023.