diff --git a/Makefile b/Makefile index 86c86ce..191f688 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,10 @@ -fossbeans: Main.cpp Project.h - g++ main.cpp -o fossbeans +fossbeans: main.o project.o + g++ main.o project.o -o fossbeans -Project.o: Project.cpp Project.h - g++ -c Project.cpp +main.o: main.cpp project.h + g++ -c main.cpp +project.o: project.cpp project.h + g++ -c project.cpp clean: - rm -f Project.o fossbeans + rm -f project.o fossbeans diff --git a/main.cpp b/main.cpp index dbe8190..a5fb02d 100644 --- a/main.cpp +++ b/main.cpp @@ -2,9 +2,9 @@ #include #include -#include "Project.h" +#include "project.h" -using namespace std: +using namespace std; int main() { vector projects; @@ -29,7 +29,7 @@ int main() { case 'N': cout << "Enter name for the new project: " << endl; cin >> eneteredProjectName; - projects.push_back(new Poject(eneteredProjectName)); + projects.push_back(new Project(eneteredProjectName)); break; case 'M': diff --git a/Project.cpp b/project.cpp similarity index 92% rename from Project.cpp rename to project.cpp index 190b502..da41516 100644 --- a/Project.cpp +++ b/project.cpp @@ -1,8 +1,9 @@ #include "project.h" Project::Project(std::string name) : _name(name), _submitted(0), _accepted(0) +{} -int Project::getRequests() +int Project::getRequests() { return _submitted; } @@ -28,4 +29,4 @@ void Project::acceptRequest() return; _submitted--; _accepted++; -} \ No newline at end of file +} diff --git a/project.h b/project.h index 5250bf8..772783a 100644 --- a/project.h +++ b/project.h @@ -1,4 +1,4 @@ -/* +/* @file: project.h @author: Pinak Das @@ -6,7 +6,7 @@ */ #ifndef PROJECT_H #define PROJECT_H -#include +#include class Project { private: int _submitted; @@ -19,6 +19,8 @@ class Project { int getSubmittedRequests(); int getAcceptedRequests(); std::string getName(); -} + int getRequests(); + void submitRequests(); +}; #endif