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;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

class diagram -> java
inheritance
Pet

A
public class Cat extends Pet{
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
class diagram -> java
Pet {abstract}
A
abstract class Pet {
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

class diagram -> java

A

public static double intrestRate;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
class diagram -> java
-withdrawings : Real [*]
A

private ArrayList withdrawings;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

class diagram -> java (ook peto

A
public interface Shape {
}
public class Circle implements Shape{
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Welke quote hoort bij loose coupling

A

program to an interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Wat is loose coupling

A

classes implementeren een interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
class diagram -> java
<>
Gender
-------------------------
male
female
A

public enum Gender {
male, female
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
class diagram -> java
Package
            <> controller------------------->model
A

package controller;

import model.*;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly