Android Studio Assignment

Scenario
You have been tasked to develop an application which manages student tasks. An instructor
should be a to add tasks for students. A task should have a taskID, taskName, dueDate, and
a module where the test is for. A module should have a moduleID, moduleName, and the
duration for the module. Modules should be added by an admin. Students should also be
added by the admin, and students should have a studentID, studentName, studentSurname,
and the Dob. Students and instructors should be able to sign into the system to access
different functionalities.
Functionality for students include:
• Access tasks created by the instructor.
• Indicate whether the tasks are completed or not.
Functionality for the instructor includes:
• Creating tasks for students.
Functionality for adminsinclude:
• Creating students’ records.
• Creating module records.
• Creating instructor records.
You are required to implement a login activity to control access between the different roles
(admin, instructor, and a student) and use a navigation activity to group the different activities
for a specific user role. Each functionality in the program should have its own activity.

The following is what i have done so far:

public class LoginActivity extends AppCompatActivity {
private EditText usernameEditText, passwordEditText;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);

    usernameEditText = findViewById(R.id.usernameEditText);
    passwordEditText = findViewById(R.id.passwordEditText);
    Button loginButton = findViewById(R.id.loginButton);

    loginButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            // Perform authentication logic here
            String username = usernameEditText.getText().toString();
            String password = passwordEditText.getText().toString();

            // Example authentication logic (replace with your own)
            if (username.equals("admin") && password.equals("admin")) {
                // Redirect to AdminActivity
                startActivity(new Intent(LoginActivity.this, AdminActivity.class));
            } else if (username.equals("instructor") && password.equals("instructor")) {
                // Redirect to InstructorActivity
                // startActivity(new Intent(LoginActivity.this, InstructorActivity.class));
                Toast.makeText(LoginActivity.this, "Instructor login", Toast.LENGTH_SHORT).show();
            } else if (username.equals("student") && password.equals("student")) {
                // Redirect to StudentActivity
                // startActivity(new Intent(LoginActivity.this, StudentActivity.class));
                Toast.makeText(LoginActivity.this, "Student login", Toast.LENGTH_SHORT).show();
            } else {
                // Invalid credentials
                Toast.makeText(LoginActivity.this, "Invalid username or password", Toast.LENGTH_SHORT).show();
            }
        }
    });
}

}

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật