Search Header Logo

OOP Review

Authored by Alvin Tjondrowiguno

Information Technology (IT)

University

Used 2+ times

OOP Review
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 10 pts

Dari beberapa pilihan di bawah ini, mana saja yang bisa dibuat menjadi instance / object?

Class biasa dan Anonymous class

Abstract class dan Interface

Abstract class dan Class biasa

Interface dan Anonymous class

2.

MULTIPLE CHOICE QUESTION

3 mins • 10 pts

Media Image

Perhatikan code berikut ini. Pilihlah implementasi fungsi main() yang menghasilkan output "Print B" ketika dijalankan!

Media Image
Media Image
Media Image
Media Image

3.

MULTIPLE CHOICE QUESTION

3 mins • 10 pts

Mana relasi antar class yang tidak bisa dibuat?

Interface extends Interface

AbstractClass extends AbstractClass

AbstractClass implements Interface

Interface extends AbstractClass

4.

MULTIPLE CHOICE QUESTION

3 mins • 10 pts

Media Image

Untuk membuat Class Point sebagai Composition dari Class Circle seperti tampak di Class Diagram dibawah, maka Constructor variabel center harus berisi ...

Point(x, y)

new Point(x, y)

new Circle(x, y)

Point(center)

5.

MULTIPLE CHOICE QUESTION

3 mins • 10 pts

Media Image

Yang akan menghasilkan error jika ditambahkan dalam program dibawah ini adalah ...

public double Produksi(double x, double y, String z) { ..... }

public int Produksi(int x, int y, int z) { ..... }

public double Produksi(double x, double y) { ..... }

public String Produksi(double x, double y, double z) { ..... }

6.

MULTIPLE CHOICE QUESTION

3 mins • 10 pts

Media Image

Perhatikan coding dibawah ini. Ada 2 Class: Class Page dan Class Book. Relasi mana yang paling cocok menggambarkan hubungan ke dua kelas diatas?

Page IS-A Book

Page HAS-A Book

Book HAS-A Page

Book IS-A Page

7.

MULTIPLE CHOICE QUESTION

3 mins • 10 pts

Agar variabel dalam sebuah Class dapat diakses hanya oleh class tersebut dan semua class lain dalam package yang sama, maka pada deklarasi variabel kita tambahkan modifier:

Private

Public

Protected

Tanpa modifier

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?