resolve conflicts

This commit is contained in:
Anshu Sharma 2018-11-07 12:17:18 -05:00
parent d4f1433f91
commit 5eae198bbf
2 changed files with 54 additions and 0 deletions

View file

@ -1,10 +1,29 @@
package com.uottawa.olympus.olympusservices; package com.uottawa.olympus.olympusservices;
/**
* This class allows the app to create admin object which is a child of the UserType class.
* The admin object has administrator control over the app. A user logging in with
* admin can delete and edit user profiles and delete and edit services.
*
*/
public class Admin extends UserType { public class Admin extends UserType {
/**
* Constructs an admin object such that the admin
* has a constant username and password of admin and admin.
* And the admin has a constant first name and last name of Admin.
* there should only be one admin object.
*/
Admin(){ Admin(){
super("admin", "admin", "Admin", "Admin"); super("admin", "admin", "Admin", "Admin");
} }
/**
* This method is a method gets the string object describing the
* role of the object.
*
* @return String "admin"
*/
public String getRole(){ return "Admin"; } public String getRole(){ return "Admin"; }
} }

View file

@ -0,0 +1,35 @@
package com.uottawa.olympus.olympusservices;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
public class AdminWelcome extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_admin_welcome);
}
@Override
public void onBackPressed(){
}
public void LogOut(View view){
Intent intent = new Intent(getApplicationContext(), Main.class);
startActivity(intent);
finish();
}
public void goToUsers(View view){
Intent intent = new Intent(getApplicationContext(), UsersList.class);
startActivity(intent);
}
public void goToServices(View view){
Intent intent = new Intent(getApplicationContext(), ServicesList.class);
startActivity(intent);
}
}