Skip to content
Open
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
11 changes: 0 additions & 11 deletions CSC207_PROJECT.iml

This file was deleted.

Binary file added Habit Builder Project/src/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
package interface_adapter.log_habit;

import use_case.log_habit.LogHabitOutputBoundary;
import view.LogHabit.LogHabitState;
import view.LogHabit.LogHabitViewModel;

/**
* Presenter for the Log Habit use case. This class acts as an intermediary between the use case (business logic)
* and the view model (user interface logic). It implements the LogHabitOutputBoundary interface to
* respond to output from the use case.
*/
public class LogHabitPresenter implements LogHabitOutputBoundary {

private LogHabitViewModel logHabitViewModel;

/**
* Constructs a LogHabitPresenter with a given LogHabitViewModel.
*
* @param logHabitViewModel The view model that this presenter will interact with.
*/
public LogHabitPresenter(LogHabitViewModel logHabitViewModel) {
this.logHabitViewModel = logHabitViewModel;
}



/**
* Resets the input field in the view model. This method is called as part of the output boundary
* when the use case indicates that the input number should be reset.
*/
@Override
public void ResetInputNumber() {
logHabitViewModel.resetInputField();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package use_case.log_habit;

public class LogHabitOutputData {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package use_cases.data_entry;

public interface DataEntryInputBoundary {
/*
* method signatures for interactor
* */

void execute(DataEntryInputData dataEntryInputData);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package use_cases.data_entry;

public class DataEntryInputData {

final private String user;
//input username
final private String task;
// the study task that they are logging, ex. leetcode, practicing math
final private String startDay;
// tentatively, we will have habit to be a fixed weekly habit.
// so we will only give users the option to choose the start day, but not the end date.
final private int amountHours;
// tentatively, we will have hours as units


public DataEntryInputData(String user, String task, String startDay, int hours, int amountHours) {
this.user = user;
this.task = task;
this.startDay = startDay;
this.amountHours = amountHours;
}

public int getAmountHours() {
return amountHours;
}

public String getStartDay() {
return startDay;
}

public String getTask() {
return task;
}

public String getUser() {
return user;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package use_cases.data_entry;

public class DataEntryInteractor implements DataEntryInputBoundary{
@Override
public void execute(DataEntryInputData dataEntryInputData) {
// if they enter the same task name during the week:
// add amount into existing task name
// else:
// create new task, and add hours to it
// data access
// output data
// display view "successfully added"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package use_cases.data_entry;

public interface DataEntryOutputBoundary {

void prepareSuccessView(DataEntryOutputData message);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package use_cases.data_entry;

public class DataEntryOutputData {

private String successMessage;


public DataEntryOutputData(String successMessage) {
this.successMessage = successMessage;
}
}
Binary file added lib/checker-qual-3.12.0.jar
Binary file not shown.
Binary file added lib/commons-codec-1.11.jar
Binary file not shown.
Binary file added lib/commons-logging-1.2.jar
Binary file not shown.
Binary file added lib/error_prone_annotations-2.11.0.jar
Binary file not shown.
Binary file added lib/failureaccess-1.0.1.jar
Binary file not shown.
Binary file added lib/google-api-client-2.0.0.jar
Binary file not shown.
Binary file added lib/google-api-client-gson-2.0.0.jar
Binary file not shown.
Binary file added lib/google-http-client-1.42.1.jar
Binary file not shown.
Binary file added lib/google-http-client-apache-v2-1.42.1.jar
Binary file not shown.
Binary file added lib/google-http-client-gson-1.42.1.jar
Binary file not shown.
Binary file added lib/google-oauth-client-1.34.1.jar
Binary file not shown.
Binary file added lib/grpc-context-1.27.2.jar
Binary file not shown.
Binary file added lib/gson-2.9.0.jar
Binary file not shown.
Binary file added lib/guava-31.1-jre.jar
Binary file not shown.
Binary file added lib/httpclient-4.5.13.jar
Binary file not shown.
Binary file added lib/httpcore-4.4.15.jar
Binary file not shown.
Binary file added lib/j2objc-annotations-1.3.jar
Binary file not shown.
Binary file added lib/jsr305-3.0.2.jar
Binary file not shown.
Binary file not shown.
Binary file added lib/opencensus-api-0.31.1.jar
Binary file not shown.
Binary file added lib/opencensus-contrib-http-util-0.31.1.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const Alice_time_spent = [];
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const Alice_habit_hours = [0, 0, 0, 0, 0, 0, 0];
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const Bob_time_spent = [];
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const Bob_habit_hours = [0, 4, 0, 0, 0, 0, 0];
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const Charile_time_spent = [];
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const Charile_habit_hours = [0, 0, 0, 0, 0, 0, 0];
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.