--%>

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 : 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 : What do you mean by the term JFC What

    What do you mean by the term JFC? Describe in brief.

  • Q : Persistent and non-persistent objects

    Illustrate the difference between persistent and non-persistent objects in the programming?

  • Q : Define Object-oriented language

    Object-oriented language: Programming languages like Java and C++ which permit the solution to a trouble to be stated in terms of objects that belong to the classes.

  • Q : Define Bogor Bogor (Robby, Dwyer, and

    Bogor (Robby, Dwyer, and Hatcliff 2006) is an extensible software model-checking framework which includes: Software model checking algorithms Visualizations A user interface designed to

  • Q : How class can be prevented from

    How class can be prevented from inheriting further?

  • Q : Define Preempt Preempt: It is the

    Preempt: It is the presently executing thread might be preempted, or forced to give up control, by a higher priority thread which becomes eligible to run throughout its time slice.

  • Q : Explain Aggregation Aggregation : It is

    Aggregation: It is a relationship in which an object has one or more other subordinate objects as portion of its state. The subordinate objects usually have no self-governing existence separate from their containing object. Whenever the containing obj

  • Q : Explain the relationship between XHTML

    Explain the relationship between XHTML and SGML.

  • Q : Define the term Runtime error Define

    Define the term Runtime error: It is an error which causes a program to finish whenever it is being run.