๐Ÿงญ Topic: OOP Review

Quick Overview :

This topic reviews core OOP concepts including encapsulation, inheritance, polymorphism, and abstraction through practical exercises. It also introduces Generics in Java and covers optional topics like HTML, CSS, and web scraping fundamentals.


๐Ÿ“Œ Covered in This Topic

OOP Concepts Review

  • Encapsulation: Private fields with public getters/setters; data hiding and protection
  • Inheritance: Creating class hierarchies (e.g., Student and Teacher extend User)
  • Polymorphism: Different user types responding to the same method calls
  • Abstraction: Abstract classes (like User) defining common behavior

Introduction to Generics

  • Generic classes and methods for type-safe code
  • Using parameterized types with collections (ArrayList<T>)
  • Benefits: Compile-time type checking, code reusability
  • Common generic types: List<T>, Map<K,V>, Optional<T>

HTML & CSS (Optional Study Topic)

  • HTML fundamentals: Tags, attributes, document structure
  • CSS basics: Selectors, properties, styling
  • Video recordings provided by TAs
  • External learning resources recommended

Web Scraping Introduction

  • What is web scraping and why itโ€™s valuable
  • Applications: Price monitoring, market research, data collection
  • Tools: JSoup library for Java
  • HTML parsing techniques with JSoup

๐Ÿ“‘ Slides & Materials


๐Ÿ› ๏ธ Workshop & Assignments

๐Ÿ’ฌ Workshop: Hogwarts School System

  • ๐Ÿ“‚ WS-04-oop-review Repository
  • Objective: Build a magical school management system applying OOP principles
  • Class Hierarchy: User (abstract) โ†’ Student / Teacher
  • Practice Concepts: Encapsulation, Inheritance, Polymorphism, Abstraction, Lists & Collections, Input Validation, ID-based Selection
  • TODO Sections:
    • Student.java (3 TODOs): enrollInCourse(), showMyCourses(), getEnrolledCourses()
    • SchoolSystem.java (5 TODOs): registerStudent(), loginStudent(), findStudent(), addCourseToSystem(), findCourseById()
    • Main.java (4 TODOs): Registration menu, Login menu, Show my courses, Enroll logic
  • Note: For practice only - no bonus, complete with TA assistance in class

๐Ÿงฎ Assignment: IMDb Scraper (Optional/Bonus)

  • ๐Ÿ“‚ HW-5-IMDB-SCRAPER Repository
  • Objective: Parse HTML movie data using JSoup
  • Tasks:
    • Integrate JSoup dependency (pom.xml)
    • Complete Movie class design
    • Parse HTML from src/main/resources/Movies.html
    • Extract movie information (title, rating, year)
    • Implement sorting algorithms (by title, year, rating)
    • Pass JUnit tests (ParserTest.java)
    • Visualize results in Main class
  • Resources: TA tutorial videos, JSoup documentation, HTML/CSS guides
  • Evaluation: Functionality, code quality, sorting efficiency, test execution
  • Status: Optional with bonus points

RepositoryDescription
๐Ÿ“‚ WS-04-oop-reviewWorkshop: Hogwarts School System - Practice OOP concepts with a magical theme
๐Ÿ“‚ HW-5-IMDB-SCRAPERAssignment: IMDb Scraper (Optional/Bonus) - Practice web scraping with JSoup

๐ŸŒ Additional Resources


โฉ Navigation


Tip :

The Hogwarts workshop is an excellent opportunity to reinforce your understanding of OOP concepts in a fun context. Take time to understand the relationships between classes and how polymorphism works. For the optional web scraping assignment, watch the TA tutorial videos first - theyโ€™ll help you understand JSoupโ€™s parsing methods and CSS selectors. Even if you donโ€™t complete it, learning basic web scraping is a valuable skill for future projects!