Skip to content

agurchu/java-encapsulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

java-encapsulation

project 1: Task Manager System

Files

  • Main: Task.java (immutable), TaskList.java (mutable).
  • Tests: TaskTest.java.

Tasks

  1. Add removeTask(String id) to TaskList. Test it.
  2. Add isComplete field to Task (immutable). Test it.
  3. Write a test in TaskTest for equals with different IDs.
  4. Add clearTasks() to TaskList. Test it.
  5. Prepare a 1–2 min explanation on encapsulation (e.g., why Task hides fields).

project 2: User Profile System

Files

  • Main: User.java (immutable), ProfileManager.java (mutable).
  • Tests: UserTest.java.

Tasks

  1. Add removeProfile(String username) to ProfileManager. Test it.
  2. Add displayName field to User (immutable). Test it.
  3. Write a test in UserTest for equals with different emails.
  4. Add updateProfile(User user) to ProfileManager. Test it.
  5. Prepare a 1–2 min explanation on encapsulation (e.g., why User hides data).

Project 3: Event Scheduler System

Files

  • Main: Event.java (immutable), Scheduler.java (mutable).
  • Tests: EventTest.java.

Tasks

  1. Add cancelEvent(String id) to Scheduler. Test it.
  2. Add title field to Event (immutable). Test it.
  3. Write a test in EventTest for equals with different times.
  4. Add listEvents() to Scheduler (returns event IDs). Test it.
  5. Prepare a 1–2 min explanation on encapsulation (e.g., why Event hides fields).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages