VC++ vote counting application - 44541

Solution Posted by
jordanblink

jordanblink

Rating : (19)A+
Solution Detail
Price: $20.00
Request Description

Purpose

This program will provide an opportunity to solve a problem related to two-dimensional arrays.

Specifications

You are required to summarize a very large set of voting data. The data are contained in the file votingdata.txt

The format of the file includes one of the four candidates (identified by code A, B, C, or D). The second item in each line is an integer that identifies the voting precinct (1-5).

The objective is to count and summarize the vote in a report something like the following.

                   PRECINCT
              1    2    3    4    5    TOTAL
      A      xxx  xxx  xxx  xxx  xxx   xxxx
      B      xxx  xxx  xxx  xxx  xxx   xxxx
      C      xxx  xxx  xxx  xxx  xxx   xxxx
      D      xxx  xxx  xxx  xxx  xxx   xxxx
      
      TOTAL xxxx xxxx xxxx xxxx xxxx
      
      Candidate X is the winner!
          

Utilize a two-dimensional array of counters to accumulate all of the given fields of information and perform the required counts.

 

Use tons of comments!!!

Solution Description

Purpose

This program will provide an opportunity to solve a problem related to two-dimensional arrays.

Specifications

You are required to summarize a very large set of voting data. The data are contained in the file votingdata.txt

The format of the file includes one of the four candidates (identified by code A,

Attachments
CPPVoting.zip
CPPVoting.zip