Search Header Logo

Understanding C# Classes and Objects

Authored by Limor Tal

Computers

10th Grade

Used 2+ times

Understanding C# Classes and Objects
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

מה הסינטקס להגדיר מחלקה

define class ClassName() { }

ClassName class { }

class ClassName { }

class: ClassName { }

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

איך יוצרים אובייקט של מחלקה

MyClass obj = MyClass();

MyClass obj;

MyClass obj = new MyClass();

new MyClass obj = new();

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

מה המטרה של הבנאי במחלקה

למחוק אובייקט לאחר שהוא נוצר

לאתחל אובייקט כאשר הוא נוצר

להגדיר את הפעולות של המחלקה

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

מה ההבדל בין מחלקה לאובייקט

מחלקה היא תבנית ליצירת אובייקטים. אובייקט הוא מופע של מחלקה.

מחלקה ואובייקט הם אותו דבר. אין הבדלים ביניהם

מחלקה היא מופע ספציפי של אובייקט. אובייקט מגדיר את המחלקה

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

מה היתרון של שימוש בפעולות קובעות ומאחזרות

הן מאפשרות גישה ישירה למשתנים

הן מספקות אבטחת מידע על ידי הגבלת גישה למשתנים

הן מקטינות את כמות הקוד הנדרש

הן מבטלות את הצורך בבנאים

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

איך ניתן להגדיר פעולה מאחזרת עבור משתנה פרטי במחלקה

public int GetVariable() { return this.variable; }

private int GetVariable() { return variable; }

public void GetVariable() { Console.WriteLine(this.variable); }

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?