Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature 6 updates - update to README and small change #99

Merged
merged 3 commits into from
Dec 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

32 Things To Do is a to-do list application that lets students keep track of their assignments, courses and schedule.

## How to Run the Program

From the Main.java file, compile & run the program with a Java IDE. No pre-existing data needed.

## Register/Log In

Start up the program by running the `Main.java` class in the `src/main/java` directory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ protected double mockGradeCalculator(ArrayList<Task> courseTasks) {

for (Task task: courseTasks) {
if (((Gradable) task).getGradeReceived() != -1) {
mockGrade += ((Gradable) task).getWeightage() * ((Gradable) task).getGradeReceived();
gradedWeightage += ((Gradable) task).getWeightage();
mockGrade += (((Gradable) task).getWeightage() / 100) * ((Gradable) task).getGradeReceived();
gradedWeightage += ((Gradable) task).getWeightage() / 100;
}
}

Expand Down Expand Up @@ -120,7 +120,7 @@ protected double requiredAverageCalculator(double goalGrade, double mockGrade, A

for (Task task: courseTasks) {
if (((Gradable) task).getGradeReceived() == -1) {
ungradedWeight += ((Gradable) task).getWeightage();
ungradedWeight += ((Gradable) task).getWeightage() / 100;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private double courseProgressCalculator(ArrayList<Task> courseTasks) {

for (Task task: courseTasks) {
if (task.getComplete()) {
completedWeightage += ((Gradable) task).getWeightage();
completedWeightage += ((Gradable) task).getWeightage() / 100;
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/test/java/test_course_tracker/GradeCalculatorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ void setup() {

//create some Task objects for the TaskMap
Assignment assignment1 = new Assignment("testAssignment1", "testAssignment1_testStudent_testCourse",
null, 0.2);
null, 20.0);
assignment1.setComplete();
assignment1.setGradeReceived(87);
Assignment assignment2 = new Assignment("testAssignment2", "testAssignment2_testStudent_testCourse",
null, 0.4);
null, 40.0);
assignment2.setComplete();
entities.Test test1 = new entities.Test("testTest1", "testTest1_testStudent_testCourse", null,
null, 0.3);
null, 30.0);
test1.setComplete();
entities.Test test2 = new entities.Test("testTest2", "testTest2_testStudent_testCourse", null,
null, 0.1);
null, 10.0);
test2.setComplete();
Event event1 = new Event("testEvent", "testEvent_testStudent_testCourse", 0, null,
null, false, "");
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/test_course_tracker/ProgressTrackerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ void setup() {

//create some Task objects for the TaskMap
Assignment assignment1 = new Assignment("testAssignment1", "testAssignment1_testStudent_testCourse",
null, 0.2);
null, 20.0);
assignment1.setComplete();
assignment1.setGradeReceived(87);
Assignment assignment2 = new Assignment("testAssignment2", "testAssignment2_testStudent_testCourse",
null, 0.4);
null, 40.0);
assignment2.setComplete();
entities.Test test1 = new entities.Test("testTest1", "testTest1_testStudent_testCourse", null,
null, 0.3);
null, 30.0);
test1.setComplete();
test1.setGradeReceived(66.5);
entities.Test test2 = new entities.Test("testTest2", "testTest2_testStudent_testCourse", null,
null, 0.1);
null, 10.0);
test2.setComplete();
Event event1 = new Event("testEvent", "testEvent_testStudent_testCourse", 0, null,
null, false, "");
Expand Down