Skip to content

Commit

Permalink
Minor improvement over pss lab on inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
metaphori committed Oct 30, 2023
1 parent 969b490 commit 86cad79
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
4 changes: 3 additions & 1 deletion config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,9 @@ packages:
- README-domain.md
- README-extension.md
- from: java/inheritance/rich-domain-design/README-extension.md
to: 02-inheritance-rich-design/Esercizio 02.md
to: 02-inheritance-rich-design/README.md
- from: readmes/pss-lab-inheritance.md
to: README.md
pss-lab08:
format:
- repo
Expand Down
4 changes: 3 additions & 1 deletion java/inheritance/improve-design/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ Look at `SimpleBankAccount` and `StrictBankAccount`.

2. Change the type of the class created in `TestBankAccount` and use it to test your implementation

3. Answer the following question:
3. Analyse what you just did: compare your `ExtendedStrictBankAccount` with `StrictBankAccount`. See how much code you *reused*.

4. Answer the following question:

We used inheritance in order to improve a sub-optimal design (of course it was sub-optimal, we didn't know inheritance existed!).
How would you have designed the application,
Expand Down
7 changes: 7 additions & 0 deletions readmes/pss-lab-inheritance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Progettazione e Sviluppo del Software (PSS) - Laboratorio su "Ereditarietà"

L'obiettivo del laboratorio consiste in:

* acquisire *familiarità con il concetto OOP di __ereditarietà__* e di come esso si realizza in Java (cf. `extends`, `super`, `@Override`)
* acquisire *esperienza pratica di come l'ereditarietà consenta il __riuso__ di implementazioni*
* consolidare la pratica della programmazione a oggetti, integrando l'ereditarietà con quanto già visto in precedenza (classi, incapsulamento, interfacce)

0 comments on commit 86cad79

Please sign in to comment.