Skip to content

Part 1 — Java Fundamentals

3 lectures (CM) · 3 lab sessions (TD) · ~3 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 Voiture class

All three CMs and TDs share a common example — the Voiture (car) class — which grows in complexity across the three sessions:

  • CM1/TD1 — basic Voiture: fields, constructor, toString(), references
  • CM2/TD2FleetManager: HashMap<String, Voiture>, custom exceptions, file I/O
  • CM3/TD3VoitureElectrique, VoitureDecapotable: inheritance, abstract, interfaces

Resources

Resource Link
Setup tutorial VSCodium & Maven
CM1 slides PDF
CM2 slides PDF
CM3 slides PDF
TD1 VSCodium, Maven & Voiture
TD2 Collections & Exceptions
TD3 Inheritance & Polymorphism
Bonus TD Polynomial Arithmetic