#include <iostream>
#include <fstream>
#include <string>
using namespace std;
class BasketballPlayer
{
public:
void printBasketballPlayer() const;
BasketballPlayer(); //Default Constructor
BasketballPlayer(string); //Constructor with Parameters
private:
string name;
int MinutesPlayed;
float PlayerScoreEffRating;
float Steals;
float AST;
float PointPerGame;
float Rebounds;
float FieldGoal;
float FreeThrow;
float ThreePointers;
float BLK;
float TurnOver;
//More Data members
};
class BasketballTeam
{
public:
void printBasketballTeam() const;
bool findPlayer(const BasketballPlayer &) const;
void editPlayer(BasketballPlayer &);
int WinningTeam(const BasketballPlayer &);
BasketballTeam(); //Default Constructor
private:
BasketballPlayer[18];
}
int main()
{
ofstream outdata;
outdata.open("FlieNets.csv");
return 0;
}//end main
void BasketballPlayer::printBasketballPlayer() const
{
BasketballPlayer Player;
cout << "|| The players name || " << Player.name;
cout << endl;
cout << "|| Minutes Per Game || " <<Player.MinutesPlayed;
cout << endl;
cout << "|| Turnovers Per Game || " << Player.TurnOver;
cout << endl;
cout << "|| Points Per Game || " << Player.PointPerGame;
cout << endl;
cout << "|| Rebounds Per Game || " << Player.Rebounds;
cout << endl;
cout << "|| Asists Per Game || " << Player.AST;
cout << endl;
cout << "|| Blocks Per Game || " << Player.BLK;
cout << endl;
cout << "|| 3 Point % || " << Player.ThreePointers;
cout << endl;
cout << "|| Free-Throw % || " << Player.FreeThrow;
cout << endl;
cout << "|| Field Goal %|| " << Player.FieldGoal;
cout << endl;
cout << "|| Steals % || " << Player.Steals;
cout << endl;
cout << "|| Player Scoreing Effiencey Rating || " << Player.PlayerScoreEffRating;
cout << endl;
}
BasketballPlayer::BasketballPlayer() //Default Constructor
{
name = "TBD";
MinutesPlayed = 0;
PlayerScoreEffRating = 0;
Steals = 0;
AST = 0;
PointPerGame = 0;
Rebounds = 0;
FieldGoal = 0;
FreeThrow = 0;
ThreePointers = 0;
BLK = 0;
TurnOver = 0;
}
BasketballPlayer::BasketballPlayer(string) //Constructor with Parameters
{
BasketballPlayer Player;
Player.name = " James Harden";
Player.MinutesPlayed = 40.2;
Player.TurnOver = 4.2;
Player.PointPerGame = 24.1;
Player.Rebounds = 8.1;
Player.AST = 12.0;
Player.BLK = 0.6;
Player.ThreePointers = 37.9;
Player.FreeThrow = 89.2;
Player.FieldGoal = 48.2;
Player.Steals = 1.1;
Player.PlayerScoreEffRating = 1.561;
}
void BasketballTeam::printBasketballTeam()
{
BasketballTeam Team;
BasketballTeam();
while (line != " ")
{
}
}
bool BasketballTeam::findPlayer(const BasketballPlayer&)
{
bool Finder = false;
BasketballTeam Team;
if (BasketballPlayer)
{
Finder = true;
}
return Finder;
}
void BasketballTeam::editPlayer(BasketballPlayer &)
{
}
BasketballTeam::BasketballTeam() //Default Constructor
{
ofstream outdata;
outdata.open("FlieNets.csv");
}
So I have an excel sheet of the brooklyn nets stats I converted it in csv. Their are 17 players in the file with 11 stats each. It reads player name, Mintues played, etc. So I want to read from file and add the data into my basketballTeam class. Really green about classes and hate doing fsteam. I need to be able to search the data of player by their name then be able to change any of their stats.