| | |
Basketball League Project
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jul 2006
Posts: 73
Reputation:
Solved Threads: 0
I am coding a class project where I will have a basketball league. The league will include 3 divisions and each division will have 5 teams. Each team will have a number of players and one coach. I must have 5 seperate classes. I already have two classes called person and player and will also add coach. I think my next two classes will be division and team. My question is how should I implement these two classes? I must be able to add players and a coach to a team and add teams to a division. Should I use arrays for only 3 divisions and for the teams? I'm just a little confused on how to set everything up and how everything will interact.
Climbing the learning curve of C++
Becoming an expert seems light years away!
Becoming an expert seems light years away!
•
•
•
•
I am coding a class project where I will have a basketball league. The league will include 3 divisions and each division will have 5 teams. Each team will have a number of players and one coach. I must have 5 seperate classes. I already have two classes called person and player and will also add coach. I think my next two classes will be division and team. My question is how should I implement these two classes? I must be able to add players and a coach to a team and add teams to a division. Should I use arrays for only 3 divisions and for the teams? I'm just a little confused on how to set everything up and how everything will interact.
C Syntax (Toggle Plain Text)
[ class_league ] [ class_division ] [ class_team ] [ class_player ] | | | |___________ | | | |_[ class_division1 ] | | |___[ class_player1 | |_____[ class_division2 ] | | |___[ class_player2 |_________[ class_division3 ] | | |___[ class_player3 [ class_team1 ]______________| .... player up to 5 [ class_team2 ]______________| [ class_team3 ]______________| .... team division up to 5
There will be one class league.
There will be a base class, perhaps an ADT (i.e. pure virtual) class division and inhereted class divisionN where N is the sucessive number up to the number of divisions you desire.
There will be a base class team, also maybe ADT, team and inherited teams.
There will be a base class player and follows the same as the above description of base classes.
The point is, is classes have commonalities, these commonalities (i.e. functions and/or rules) will be implemented or specified for the base classes of the inherited classes. You'll have to figure the distinctions for each inherited class and their commonalities. Just some ideas.
Good luck, LamaBot
Last edited by WaltP; Mar 7th, 2007 at 2:41 am. Reason: Added CODE tags to preserve formatting -- did you look at your post with the PREVIEW button?
Referring to my previous post reply, I'll give an example of the distinctions and commonalites. Each team could have uniforms. The uniforms for each team have a basic structure yet have a different logo design. The basic structure might be specified in the base class of the team or just have a base class for the uniform. Each teams logo would be used in the inherited class which inherit the basic structure of the uniform but add some unique logo specific for that team.
Good luck, LamaBot
Good luck, LamaBot
Last edited by Lazaro Claiborn; Mar 7th, 2007 at 2:37 am.
![]() |
Similar Threads
- project plz who can help me (C++)
- Project (C)
- who can help me in c++ project (C++)
- Ideas for final year multimedia project (IT Professionals' Lounge)
- Eteamz like functionality (PHP)
- I need help with languages (PHP)
Other Threads in the C Forum
- Previous Thread: Uncompress
- Next Thread: plss help me with my case study......
Views: 959 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for C
adobe ansi api array arrays asterisks binarysearch calculate centimeter char command convert copyimagefile cprogramme creafecopyofanytypeoffileinc createcopyoffile csyntax directory dynamic executable fflush file fork forloop frequency getlasterror givemetehcodez graphics gtkgcurlcompiling hacking hardware highest homework i/o inches incrementoperators infiniteloop kernel km lazy linked linkedlist linux linuxsegmentationfault list lists locate logical_drives match matrix microsoft motherboard multi mysql number open opendocumentformat opensource owf pattern pdf performance pointer pointers posix problem probleminc program programming radix recursion recv repetition research scanf scheduling scripting segmentationfault send sequential shape socketprograming spoonfeeding stack standard string strings structures student systemcall testautomation turboc unix user variable visualstudio voidmain() wab win32 windows.h





