Skip to content
Snippets Groups Projects
Commit b0970beb authored by ArktikHunter's avatar ArktikHunter
Browse files

moved local changes to new branch

parent 4dd3ad05
No related branches found
No related tags found
1 merge request!4View schedule
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="17" project-jdk-type="JavaSDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/cmpt-370-group-project.iml" filepath="$PROJECT_DIR$/.idea/cmpt-370-group-project.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
</set>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
package com.example.schedulerapp;
//todo: how does sql work? would that be easier?
import java.util.ArrayList;
public class Schedule {
private ArrayList<Shift> shifts;
public Schedule(){
shifts = new ArrayList<>();
}
// output: all shifts
public ArrayList<Shift> getAllShifts(){
return shifts;
}
//todo: java date?
// output: all shifts starting and/or ending on the given date
public ArrayList<Shift> getDateShifts(){
ArrayList<Shift> result = new ArrayList<>();
// get all appropriate shifts, add to result
return null;
//return result;
}
//todo
// output: all shifts assigned to given employee
public ArrayList<Shift> getEmpShifts(int empID){
ArrayList<Shift> result = new ArrayList<>();
// get all appropriate shifts, add to result
return null;
//return result;
}
//todo
// output: all shifts marked as available
public ArrayList<Shift> getAvailableShifts(){
ArrayList<Shift> result = new ArrayList<>();
// get all appropriate shifts, add to result
return null;
//return result;
}
}
package com.example.schedulerapp;
import java.time.LocalDateTime;
public class Shift {
private int EmployeeID;
private LocalDateTime start;
private LocalDateTime end;
private boolean available;
//todo: error checking on start/end? (end cannot be before start)
public Shift(int EmpID, LocalDateTime start, LocalDateTime end){
this.EmployeeID = EmpID;
this.start = start;
this.end = end;
this.available = false;
}
public int getEmployeeID() {
return EmployeeID;
}
public LocalDateTime getStart() {
return start;
}
public LocalDateTime getEnd() {
return end;
}
public boolean isAvailable() {
return available;
}
public void setEmployeeID(int employeeID) {
EmployeeID = employeeID;
}
public void setStart(LocalDateTime start) {
this.start = start;
}
public void setEnd(LocalDateTime end) {
this.end = end;
}
public void setAvailable(boolean available) {
this.available = available;
}
//todo
// output: true if this shift and the given shift overlap at all, otherwise false
public boolean overlaps(Shift otherShift){
return false;
}
}
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment