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, andStack - Handle exceptions with try/catch and write custom exception classes
- Read and write text files
- Apply inheritance, abstract classes, and interfaces
- Override
equals()andhashCode()
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/TD2 —
FleetManager:HashMap<String, Voiture>, custom exceptions, file I/O - CM3/TD3 —
VoitureElectrique,VoitureDecapotable: inheritance, abstract, interfaces
Resources
| Resource | Link |
|---|---|
| Setup tutorial | VSCodium & Maven |
| CM1 slides | |
| CM2 slides | |
| CM3 slides | |
| TD1 | VSCodium, Maven & Voiture |
| TD2 | Collections & Exceptions |
| TD3 | Inheritance & Polymorphism |
| Bonus TD | Polynomial Arithmetic |