Skip to content

Part 1 — Java Fundamentals

3 lectures (CM) · 5 lab sessions (TD) · ~4 weeks


Objectives

By the end of Part 1 you will be able to:

  • Write and compile Java programs using Maven and VSCodium
  • Understand the key differences between Java and Python
  • Design classes with proper encapsulation, constructors, and toString()
  • Use ArrayList, HashMap, and Stack
  • Handle exceptions with try/catch and write custom exception classes
  • Read and write text files
  • Apply inheritance, abstract classes, and interfaces
  • Override equals() and hashCode()

Thread: the Car class

All three CMs and TDs share a common example — the Car class — which grows in complexity across the three sessions:

  • CM1/TD1 — basic Car: fields, constructor, toString(), references
  • CM2/TD2FleetManager: HashMap<String, Car>, custom exceptions, file I/O
  • CM3ElectricCar, Convertible, Startable: inheritance, overriding, interfaces — TD3 then applies these ideas to fresh Shape & Animal hierarchies

Resources

Resource Link
Setup tutorial VSCodium & Maven
CM1 slides PDF
CM2 slides PDF
CM3 slides PDF
TD1 VSCodium, Maven & Car
TD-Git Version Control with Git
TD2 Collections & Exceptions
TD3 Inheritance & Polymorphism
TD-Modern Modern Java — Streams, Records & Lambdas
Bonus TD Polynomial Arithmetic