Availabilities
This commit is contained in:
parent
b857c93aff
commit
8bdca52a6d
3 changed files with 40 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
package com.uottawa.olympus.olympusservices;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -13,6 +14,9 @@ public class ServiceProvider extends UserType {
|
|||
|
||||
//Field for list of services that service provider offers.
|
||||
private List<Service> services;
|
||||
//Field for array of availabilities
|
||||
private int[][] availabilities;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor for the service object which takes the parameters to
|
||||
|
@ -26,6 +30,7 @@ public class ServiceProvider extends UserType {
|
|||
ServiceProvider(String username, String password, String firstname, String lastname){
|
||||
super(username, password, firstname, lastname);
|
||||
services = new ArrayList<>();
|
||||
Availability = new Date[7][2];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -61,4 +66,17 @@ public class ServiceProvider extends UserType {
|
|||
return services;
|
||||
}
|
||||
|
||||
|
||||
public void setAvailabilities(int day, int startHour, int startMin, int endHour, int endMin){
|
||||
availabilities[day][0] = startHour;
|
||||
availabilities[day][1] = startMin;
|
||||
availabilities[day][2] = endHour;
|
||||
availabilities[day][3] = endMin;
|
||||
}
|
||||
|
||||
public int[][] getAvailabilities(){
|
||||
return availabilities;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
package com.uottawa.olympus.olympusservices;
|
||||
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
|
||||
public class ServiceProviderWelcome extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_service_provider_welcome);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ServiceProviderWelcome">
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
Loading…
Reference in a new issue