Click here to Skip to main content
15,914,419 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Accessing physical drives Pin
David Crow22-Jan-07 5:01
David Crow22-Jan-07 5:01 
AnswerRe: Accessing physical drives Pin
Big CDF22-Jan-07 5:20
Big CDF22-Jan-07 5:20 
GeneralRe: Accessing physical drives Pin
David Crow22-Jan-07 9:48
David Crow22-Jan-07 9:48 
GeneralRe: Accessing physical drives Pin
Big CDF22-Jan-07 12:50
Big CDF22-Jan-07 12:50 
GeneralRe: Accessing physical drives Pin
James R. Twine22-Jan-07 5:07
James R. Twine22-Jan-07 5:07 
AnswerRe: Accessing physical drives Pin
prasad_som22-Jan-07 5:19
prasad_som22-Jan-07 5:19 
AnswerRe: Accessing physical drives Pin
kakan22-Jan-07 20:11
professionalkakan22-Jan-07 20:11 
Questioncan any one help? [modified] Pin
Simple programmer22-Jan-07 3:16
Simple programmer22-Jan-07 3:16 
write an OOP-based software for a local publisher to generate of the score tally for each football team.

The menu-driven program is to read in the details of teams and also the various match scores from text files or equivalent according the format stated on page 2. Then the program should able to generate the various team scores and display the score tally of the choice of user of either a single individual team or the entire group. The format of the score tally is as follows:

Team Name P W D L F A Pts

which Team Name is the name of team,
P indicates the number of match records entered for the team,
W shows the number of win,
D depicts the number of draw,
L exhibits the number of loss,
F gives the total number of balls entered ‘for’ the team
A views the aggregated number of balls entered ‘against’ the team
and Pts consolidates the point system of each match score of 3 points for a win,
1 for draw and 0 for loss.

For team group display, there is a ranking system among the teams with the team awarded with the highest points (Pts) on top and follows by the rest of the teams in descending order of the points. If there are more than one teams having equal points, then the deciding factor is based on the goal difference which is the difference of ‘for’ (F) and ‘against’ (A).

For the OOP requirement, design the program and implement using two base classes, TEAM and MATCH with the necessary data members and the respective member functions. You may use a derived class, SCORE, basing on the two base classes for the data of the score tally for each team.

You may refer to page 2 and 3 for the sample displays for some details of requirement.

Please exercise creativity and object oriented approach in your program design and make your program as friendly as possible to the users.



The user input format and an example for TEAM details are as follows:
User Input Format Example

No of teams 4
Team 1 Code, Team 1 Name FRA, France
Team 2 Code, Team 2 Name SUI, Switzerland
Team 3 Code, Team 3 Name KOR, South Korea
…. Last Team TOG, Togo


The MATCH details are as follows:
User Input Format Example

No of Matches 6
1st match Score FRA - SUI 0Blush | :O
2nd match Score KOR - TOG 2:1
… FRA - KOR 1:1
TOG - SUI 0:2
TOG - FRA 0:2
SUI - KOR 2Blush | :O




The sample displays are as shown below (user inputs are in bold and underlined):

Sample Display 1: Displaying the Individual Team Score

Main Menu of the Football Score Tally Program
[1] Read in the Team and Match Details
[2] Display Individual Team Score
[3] Display Entire Group Score
[4] Quit the program
Choice? 2

Displaying the 4 teams and the respective 3-letter coding:
France: FRA Switzerland: SUI
South Korea: KOR Togo: TOG

Please enter the 3-letter team code: FRA

Number of the matches played by the France team is 3
Match [1]: France drew with Switzerland 0Blush | :O
Match [2]: France drew with South Korea 1:1
Match [3]: France won Togo 2Blush | :O

The score tally of France team is
P W D L F A Pts
France 3 1 2 0 3 1 5



Sample Display 2: Displaying the Entire Group Score

Main Menu of the Football Score Tally Program
[1] Read in the Team and Match Details
[2] Display Individual Team Score
[3] Display Entire Group Score
[4] Quit the program
Choice? 3

P W D L F A Pts
Switzerland 3 2 1 0 4 0 7
France 3 1 2 0 3 1 5
South Korea 3 1 1 1 3 4 4
Togo 3 0 0 3 1 6 0


***********************************************************************************************
can somebody help me please ?
AnswerRe: can any one help? Pin
James R. Twine22-Jan-07 3:17
James R. Twine22-Jan-07 3:17 
AnswerRe: can any one help? Pin
KarstenK22-Jan-07 4:15
mveKarstenK22-Jan-07 4:15 
AnswerRe: can any one help? Pin
David Crow22-Jan-07 4:32
David Crow22-Jan-07 4:32 
AnswerRe: can any one help? Pin
Hamid_RT22-Jan-07 18:06
Hamid_RT22-Jan-07 18:06 
Questionhw to find out a possible combination Pin
Simple programmer22-Jan-07 3:07
Simple programmer22-Jan-07 3:07 
AnswerRe: hw to find out a possible combination Pin
Maximilien22-Jan-07 3:37
Maximilien22-Jan-07 3:37 
AnswerRe: hw to find out a possible combination Pin
Stephen Hewitt22-Jan-07 11:29
Stephen Hewitt22-Jan-07 11:29 
Questionneed help... Pin
baby_fong8222-Jan-07 2:22
baby_fong8222-Jan-07 2:22 
AnswerRe: need help... Pin
Waldermort22-Jan-07 2:38
Waldermort22-Jan-07 2:38 
QuestionWindows Message handling in Debug and Release build of Dialog Based MFC Application Pin
HetalAgrawal22-Jan-07 2:15
HetalAgrawal22-Jan-07 2:15 
AnswerWill the noobs stop posting badly ??? Pin
toxcct22-Jan-07 2:17
toxcct22-Jan-07 2:17 
GeneralRe: Will the noobs stop posting badly ??? Pin
James R. Twine22-Jan-07 3:19
James R. Twine22-Jan-07 3:19 
AnswerTo the one with the empty head Pin
Waldermort22-Jan-07 2:33
Waldermort22-Jan-07 2:33 
AnswerRe: Windows Message handling in Debug and Release build of Dialog Based MFC Application Pin
Mike O'Neill22-Jan-07 13:30
Mike O'Neill22-Jan-07 13:30 
QuestionHow to capture mouse events from a control within a Dialog Box? Pin
Arris7422-Jan-07 2:02
Arris7422-Jan-07 2:02 
AnswerRe: How to capture mouse events from a control within a Dialog Box? Pin
prasad_som22-Jan-07 2:20
prasad_som22-Jan-07 2:20 
AnswerRe: How to capture mouse events from a control within a Dialog Box? Pin
Arris7422-Jan-07 6:07
Arris7422-Jan-07 6:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.