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 Decrement operator Decrement

    Decrement operator: It is an operator (--) which adds one to its operand. This has two forms: pre-decrement (--x) and post-decrement (x--). In its pre-decrement form, the outcome of the expression is the value of its argument subsequent to the decreme

  • Q : Identify Customers in SQL The company

    The company wish to provide an incentive of free shipping to such customers who have not returned for 2 months. Build a procedure named PROMO_SHIP_SP which determines these customers are and then updates the BB_PROMOLIST table accordingly. The procedure employs the be

  • Q : What is Runtime stack Runtime stack :

    Runtime stack: It is a stack structure maintained by the Java Virtual Machine which records that methods are presently being executed. The most of late entered technique will be at the top of the stack and the main technique of an application will be

  • Q : Properties exposed through ActiveX

    Write down the properties exposed through ActiveX controls?

  • Q : Explain the term soft real-time Explain

    Explain the term soft real-time.

  • Q : What is testing What is testing?

    What is testing?

  • Q : What is an Overriding for chaining

    Overriding for chaining: It is a form of method overriding in which the sub-class version of a method verifies to see whether it can react to the message on its own and just calls the super-class version of the method.

  • Q : What is Bit Bit : It is a binary digit

    Bit: It is a binary digit that can take on two possible values: 0 and 1. The bits are basic building block of both data and programs. Computers regularly shift data around in multiples of eight-bit units (that is, bytes for the sake of effectiveness).

  • Q : Explain Magic number Magic number : It

    Magic number: It is a constant value with significance within a specific context. For example, the value 12 could mean numerous different things - the number of hrs you have worked today, the number of dollars you are payable by a friend, and so forth

  • Q : Who developed Extensible Hyper-Text

    Who developed Extensible Hyper-Text Markup Language? Answer: XHTML (Extensible Hyper-Text Markup Language) was developed by W3C HTML Working Group along with Steven

©TutorsGlobe All rights reserved 2022-2023.