-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from gordon-cs/requirement-1
Pair programmed some parts and individual commits from both partners - progress for Lab 12 - Jake and Elijah
- Loading branch information
Showing
26 changed files
with
791 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# From a github template for removing unneccessary C++ files | ||
|
||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.app | ||
|
||
# The project1 executable and related files | ||
project5 | ||
|
||
# Files returned by tests | ||
*.diff | ||
test-data/project5.out | ||
|
||
# Mac setup files | ||
*.DS_Store | ||
|
||
# VS Code setup files | ||
*.vscode | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Author: Elijah Opoku-Nyarko and Jake Colbert | ||
|
||
# default target | ||
all: project5 | ||
|
||
# compile the code into an executable called 'project1' using C++ 2011 | ||
project5: project5.cc province.cc province.h | ||
g++ -std=c++11 -o project5 project5.cc province.cc | ||
|
||
# test the code against an expected output file | ||
# this test should grow into a spaceship and end with blinkers | ||
test-requirement1: project5 | ||
./project5 < test-data/requirement1.in > test-data/project5.out | ||
diff test-data/project5.out test-data/requirement1.out > test.diff | ||
wc -l test.diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* @file: project5.cc | ||
* | ||
*@brief: | ||
* Main program for CPS222 project 5 - test driver to read in a graph | ||
* from standard input and test the read graph | ||
* | ||
* @Authors: Elijah Opoku-Nyarko & Jake Colbert | ||
*/ | ||
|
||
#include <iostream> | ||
#include <string> | ||
#include "./province.h" | ||
|
||
using namespace std; | ||
|
||
/* | ||
* check if we are at the end of the file | ||
*/ | ||
bool eof() { | ||
char c; | ||
cin >> c; | ||
// if the fie is ended, return true | ||
if (cin.eof()) { | ||
return true; | ||
} else { | ||
// if the file contains more data, return the previously gotten | ||
// data to cin | ||
cin.unget(); | ||
return false; | ||
} | ||
} | ||
|
||
int main(int argc, char *argv[]) { | ||
// Repeatedly read input from standard input | ||
while (!eof()) { | ||
// create a new graph for each loop, which will read all of the | ||
// corresponding data per graph | ||
Province theProvince(cin); | ||
|
||
cout << endl; | ||
cout << "------------------------------------------------" << endl; | ||
cout << "---------------- New DataSet: ------------------" << endl; | ||
cout << "------------------------------------------------" << endl; | ||
cout << endl; | ||
|
||
theProvince.printAll(0, cout); | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Mac files | ||
.DS_Store | ||
|
||
# Mac + Google Drive files | ||
Icon? | ||
|
||
# Emacs backup and temp files | ||
*~ | ||
\#*\# |
Oops, something went wrong.