Project Overview

This project is the final report for the National Taiwan Normal University Object-Oriented Design and Analysis course, completed through collaboration of 6 classmates. It is a development report and design showcase for the Campus Portal System. This system aims to integrate multiple services commonly used by students and faculty on campus, providing a convenient mobile application experience.

  • Project Name: Campus Portal System
  • Scope of Functions: The system covers 10 core User Cases.

Core System Functions (Use Cases Summary)

The Campus Portal System is divided into four main modules and includes common authentication and information display functions.

System Module Core Functions (Use Cases) Supported Interface/Role
Event System 1. Create/Delete events; 2. Register/Cancel events; 3. Query/Browse events. Organizer / Participant
Dining System 1. Browse menus; 2. Reserve meals. Student
Attendance System 1. Teacher rollcall (open, close, and view results); 2. Student rollcall (perform “I need rollcall”). Professor / Student
Course Schedule System 1. Add/Delete courses. Student
Common Functions 1. Personal information display (My course schedule + meal reservation info); 2. Login/Logout (permission management of identity). Professor / Student

UML

System Architecture and Design Patterns

This project design follows object-oriented principles (UML Class Diagram) and applies three core design patterns to ensure system maintainability and functional decoupling.

1. Facade Pattern

We use the Facade Pattern to provide a high-level unified interface that simplifies interaction with complex underlying subsystems (such as authentication and database access).

  • Unified Interface: FirebaseFacade
  • Underlying Subsystems: FirebaseAuth (authentication) and DatabaseReference (database)

FirebaseFacade Core Methods (Excerpt)

class FirebaseFacade {
    + getStudent()
    + createStudent()
    + createProfessor()
    + getStudentCourses()
    + getStudentMeals()
    + addStudentCourse()
    + addStudentActivity()
    + deleteStudentCourse()
    + deleteStudentMeal()
    // ... other data operation methods
}

facade

2. Command Pattern

In the dining system, we use the Command Pattern to handle order processes, achieving decoupling between the requester and the order executor, which is especially suitable for the “meal reservation” function.

  • Requester (Invoker): ShoppingCart
  • Command Interface: Order
  • Receiver Interface: Shop
  • Concrete Commands: Shop1Order, Shop2Order
  • Receiver Implementation: Shop1Worker, Shop2Worker command

ShoppingCart (Invoker) Core Methods

class ShoppingCart(Invoker) {
    + SetOrder(Order): void
    + CancelOrder(Order): void
    + NotifyShop(): void
    // ...
}

3. Adapter Pattern

In the event system’s news list display, we applied the Adapter Pattern to convert non-standardized event data into the standard format required by RecyclerView.

  • Adapter: AdaptarClass
  • Adaptee (Data Source): Data_4show (contains activity_event list, and methods such as getTitle(), getDescription())
  • Target Interface: RecyclerView.Adapter

AdaptarClass Core Structure (Excerpt)

class AdaptarClass : RecyclerView.Adapter {
    - list: ArrayList<News>
    - context: Context

    + AdaptarClass(context, list)
    + onCreateViewHolder(...)
    + onBindViewHolder(...)
    + getItemCount(): int
}

adapter

Updated: