3 class diagram to java code Flashcards
1
Q
class diagram -> java
asociation
Student* - Teacher
A
class Student{ private Teacher teacher; }
class Teacher{ private ArrayList studentList; }
2
Q
class diagram -> java
inheritance
Pet
A
public class Cat extends Pet{ }
3
Q
class diagram -> java
polymorphism
Pet
A
Pet animal = new Cat(“Minoes”)
!!Enkel methodes die override zijn werken, niet
methodes die enkel in cat staan
4
Q
class diagram -> java Pet {abstract}
A
abstract class Pet { }
5
Q
class diagram -> java
A
public static double intrestRate;
6
Q
class diagram -> java -withdrawings : Real [*]
A
private ArrayList withdrawings;
7
Q
class diagram -> java (ook peto
A
public interface Shape { } public class Circle implements Shape{ }
8
Q
Welke quote hoort bij loose coupling
A
program to an interface
9
Q
Wat is loose coupling
A
classes implementeren een interface
10
Q
class diagram -> java <> Gender ------------------------- male female
A
public enum Gender {
male, female
}
11
Q
class diagram -> java Package
<> controller------------------->model
A
package controller;
import model.*;