--%>

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

  • Q : Define Deep copy Deep copy : It is a

    Deep copy: It is a copy of an object in which copies of all the object's sub-components are also prepared. The resultant object may, in effect, be a clone of the novel.

  • Q : Differentiate between MFC and Win32

    Differentiate between MFC and Win32?

  • Q : Computer science 1. Here is a short

    1. Here is a short program. It prints out the value of a variable "x". Ernie and Bert disagree about what will be printed: Ernie says, the value gets changed in "changeX" so it will print "7", and Bert says, no, when the function exits the changes get reversed and the value goes back to "5". Explain

  • Q : Explain Polymorphism Polymorphism : It

    Polymorphism: It is the ability of an object reference to be employed as if it referred to an object with various forms. The polymorphism in Java outcomes from both class inheritance and interface inheritance. The actually different forms frequently o

  • Q : Explain shell variables Explain the

    Explain the shell variables?

  • Q : Explai phases of software development

    Define the difference between phases of software development or software life cycle?

  • Q : Define Compilation Compilation : It is

    Compilation: It is a process of translating a programming language. This frequently comprises translating a high level programming language into a low level programming language, and the binary form of a specific instruction set. The translation is ex

  • Q : What is an Internet Service Provider

    Internet Service Provider: It is an Internet Service Provider (abbreviated as ISP) gives connections to the Internet for users who do not contain their own network. The ISP gives such user with their own IP address which enables them to interact with

  • Q : Difference between the choice and list

    Illustrate the difference between the choice and list?

  • Q : Which kernel objects is utilize for

    Which kernel objects is utilize for thread Synchronization on various processes? Answer: For thread synchronization on various processes kernel objects are utilize