ログイン

(Finals) Integrative Programming Mocktest BSIT 402
24問 • 7ヶ月前
  • Xai Alexandrei Delos Reyes
  • 通報

    問題一覧

  • 1

    is one of the principles of object-oriented programming that allows the defining of a child class that reuses or inherits the behavior of a parent class (or existing class).

    Inheritance

  • 2

    The inheriting class is called a _______

    derived class

  • 3

    The existing class whose members are being inherited is called a ______

    base class

  • 4

    Which syntax is correct where the class Student inherit from class "Person"?

    public class Student : Person { }

  • 5

    Members of a superclass are declared _______ if you want its subclasses to access its members.

    protected

  • 6

    In C#, the ____ keyword is used to specify which constructor from the base class should invoke when creating instances of the derived class.

    base

  • 7

    Which of the following syntax is correct when a derived class Student inherits the constructor of it's base class Person

    public Student(string name, int age, long id, string program) : base(name, age) { this.student_id = id; this.student_program = program; }

  • 8

    A derived class inherits the methods of its base class. Declaring a method in a derived class with the same name as the method from its base class is called _____________.

    method overriding

  • 9

    In C#, the overridden method from the base class should be declared as _____.

    virtual

  • 10

    When overriding a virtual method from the base class, the _______ modifier is required to modify the abstract or virtual implementation of the inherited method and must have the same method signature as the overridden method (virtual method).

    override

  • 11

    An __________ is a base class that cannot be instantiated to create an object.

    abstract class

  • 12

    Which syntax properly creates an abstract class of BankAccount?

    public abstract class BankAccount { }

  • 13

    Which syntax properly creates a abstract method named deposit

    public abstract void deposit(double amount);

  • 14

    ____________ which means “multiple forms,” is one of the fundamental concepts of object-oriented programming.

    Polymorphism

  • 15

    Also known as “static polymorphism,” this polymorphism is implemented using method overloading.

    Compile time polymorphism

  • 16

    This polymorphism is a process in which the compiler determines which method to call during runtime

    Runtime polymorphism

  • 17

    An _______ only contains the signatures of methods, properties, and events as its members. It is the responsibility of the class implementing the interface to provide the implementation of the members.

    interface

  • 18

    Which syntax properly creates a interface ITransactions

    public interface ITransactions { }

  • 19

    An interface cannot contain instance variables or fields but may contain __________.

    properties

  • 20

    Which syntax correctly creates properties for an interface IPerson, and set them accordingly.

    public interface IPerson { string first_name { get; set; } string last_name { get; set; } int age { get; set; } void setInfo(string FName, string LName, int year_old); }

  • 21

    What is the output of the following program when compiled and executed? using System; public abstract class Message { public abstract void printMessage(); public void printSomething() { Console.Write("Good morning!"); } } public class LocalMessage : Message { public override void printMessage() { Console.Write("Hello!"); } public static void Main(string[] args) { LocalMessage lm1 = new LocalMessage(); lm1.printMessage(); } }

    Hello!

  • 22

    What is the output of the following program when compiled and executed? using System; public class Number { protected int a = 0; } public class LocalNumber : Number { public void math() { Console.Write(this.a++); } public static void Main(string[] args) { LocalNumber ln1 = new LocalNumber(); ln1.math(); ln1.math(); } }

    01

  • 23

    Consider the following program: public class Number { private int number; public virtual void setNumber(int number) { this.number = number; } } public class LocalNumber : Number{ public override void setNumber(int number) { number = number + 5; base.setNumber(number); } } Which method is overridden?

    setNumber method from Number class

  • 24

    What is the value of the variable number when the following program is compiled and executed? using System; public abstract class Number { public abstract int getNumber(int x); } public class LocalNumber : Number { private int x = 5; public override int getNumber(int x) { return this.x+=x; } public static void Main(string[] args) { LocalNumber ln1 = new LocalNumber(); int number = ln1.getNumber(5); } }

    10

  • The Contemporary World Mock test (Prelims)

    The Contemporary World Mock test (Prelims)

    Xai Alexandrei Delos Reyes · 58問 · 2年前

    The Contemporary World Mock test (Prelims)

    The Contemporary World Mock test (Prelims)

    58問 • 2年前
    Xai Alexandrei Delos Reyes

    Computing Mock test (Prelims)

    Computing Mock test (Prelims)

    Xai Alexandrei Delos Reyes · 67問 · 2年前

    Computing Mock test (Prelims)

    Computing Mock test (Prelims)

    67問 • 2年前
    Xai Alexandrei Delos Reyes

    Programming Mock Test (Prelims)

    Programming Mock Test (Prelims)

    Xai Alexandrei Delos Reyes · 64問 · 2年前

    Programming Mock Test (Prelims)

    Programming Mock Test (Prelims)

    64問 • 2年前
    Xai Alexandrei Delos Reyes

    Entrepreneurship Mock Test (Prelims)

    Entrepreneurship Mock Test (Prelims)

    Xai Alexandrei Delos Reyes · 23問 · 2年前

    Entrepreneurship Mock Test (Prelims)

    Entrepreneurship Mock Test (Prelims)

    23問 • 2年前
    Xai Alexandrei Delos Reyes

    Computing Mock Test (Midterms) BSIT 107

    Computing Mock Test (Midterms) BSIT 107

    Xai Alexandrei Delos Reyes · 76問 · 2年前

    Computing Mock Test (Midterms) BSIT 107

    Computing Mock Test (Midterms) BSIT 107

    76問 • 2年前
    Xai Alexandrei Delos Reyes

    Math Mock Test (Prelims)

    Math Mock Test (Prelims)

    Xai Alexandrei Delos Reyes · 48問 · 2年前

    Math Mock Test (Prelims)

    Math Mock Test (Prelims)

    48問 • 2年前
    Xai Alexandrei Delos Reyes

    Programming Mock Test (Midterms) BSIT 107

    Programming Mock Test (Midterms) BSIT 107

    Xai Alexandrei Delos Reyes · 52問 · 2年前

    Programming Mock Test (Midterms) BSIT 107

    Programming Mock Test (Midterms) BSIT 107

    52問 • 2年前
    Xai Alexandrei Delos Reyes

    UTS Mock Test (Midterms) BSIT107

    UTS Mock Test (Midterms) BSIT107

    Xai Alexandrei Delos Reyes · 40問 · 2年前

    UTS Mock Test (Midterms) BSIT107

    UTS Mock Test (Midterms) BSIT107

    40問 • 2年前
    Xai Alexandrei Delos Reyes

    Entrepreneurship Mock Test (Midterms) BSIT 107

    Entrepreneurship Mock Test (Midterms) BSIT 107

    Xai Alexandrei Delos Reyes · 38問 · 2年前

    Entrepreneurship Mock Test (Midterms) BSIT 107

    Entrepreneurship Mock Test (Midterms) BSIT 107

    38問 • 2年前
    Xai Alexandrei Delos Reyes

    Contemporary World Mock Test (Midterms) BSIT 107

    Contemporary World Mock Test (Midterms) BSIT 107

    Xai Alexandrei Delos Reyes · 28問 · 2年前

    Contemporary World Mock Test (Midterms) BSIT 107

    Contemporary World Mock Test (Midterms) BSIT 107

    28問 • 2年前
    Xai Alexandrei Delos Reyes

    Math Mocktest (Midterms) BSIT 107

    Math Mocktest (Midterms) BSIT 107

    Xai Alexandrei Delos Reyes · 24問 · 2年前

    Math Mocktest (Midterms) BSIT 107

    Math Mocktest (Midterms) BSIT 107

    24問 • 2年前
    Xai Alexandrei Delos Reyes

    Computer Programming Mocktest (Pre-finals)

    Computer Programming Mocktest (Pre-finals)

    Xai Alexandrei Delos Reyes · 26問 · 2年前

    Computer Programming Mocktest (Pre-finals)

    Computer Programming Mocktest (Pre-finals)

    26問 • 2年前
    Xai Alexandrei Delos Reyes

    Math Mocktest (Pre-Finals)

    Math Mocktest (Pre-Finals)

    Xai Alexandrei Delos Reyes · 19問 · 2年前

    Math Mocktest (Pre-Finals)

    Math Mocktest (Pre-Finals)

    19問 • 2年前
    Xai Alexandrei Delos Reyes

    Computing Mock Test (Pre-finals)

    Computing Mock Test (Pre-finals)

    Xai Alexandrei Delos Reyes · 36問 · 2年前

    Computing Mock Test (Pre-finals)

    Computing Mock Test (Pre-finals)

    36問 • 2年前
    Xai Alexandrei Delos Reyes

    Computing Mock Test Finals

    Computing Mock Test Finals

    Xai Alexandrei Delos Reyes · 26問 · 2年前

    Computing Mock Test Finals

    Computing Mock Test Finals

    26問 • 2年前
    Xai Alexandrei Delos Reyes

    Comprog 2nd sem (prelims) BSIT 205

    Comprog 2nd sem (prelims) BSIT 205

    Xai Alexandrei Delos Reyes · 63問 · 1年前

    Comprog 2nd sem (prelims) BSIT 205

    Comprog 2nd sem (prelims) BSIT 205

    63問 • 1年前
    Xai Alexandrei Delos Reyes

    Discrete Math 2nd sem (prelims) BSIT 205

    Discrete Math 2nd sem (prelims) BSIT 205

    Xai Alexandrei Delos Reyes · 36問 · 1年前

    Discrete Math 2nd sem (prelims) BSIT 205

    Discrete Math 2nd sem (prelims) BSIT 205

    36問 • 1年前
    Xai Alexandrei Delos Reyes

    Art Appreciation (Prelim) BSIT 205

    Art Appreciation (Prelim) BSIT 205

    Xai Alexandrei Delos Reyes · 56問 · 1年前

    Art Appreciation (Prelim) BSIT 205

    Art Appreciation (Prelim) BSIT 205

    56問 • 1年前
    Xai Alexandrei Delos Reyes

    Ethics 2nd sem (Prelims) BSIT 205

    Ethics 2nd sem (Prelims) BSIT 205

    Xai Alexandrei Delos Reyes · 45問 · 1年前

    Ethics 2nd sem (Prelims) BSIT 205

    Ethics 2nd sem (Prelims) BSIT 205

    45問 • 1年前
    Xai Alexandrei Delos Reyes

    STS 2nd Sem (Prelim) BSIT 205

    STS 2nd Sem (Prelim) BSIT 205

    Xai Alexandrei Delos Reyes · 40問 · 1年前

    STS 2nd Sem (Prelim) BSIT 205

    STS 2nd Sem (Prelim) BSIT 205

    40問 • 1年前
    Xai Alexandrei Delos Reyes

    問題一覧

  • 1

    is one of the principles of object-oriented programming that allows the defining of a child class that reuses or inherits the behavior of a parent class (or existing class).

    Inheritance

  • 2

    The inheriting class is called a _______

    derived class

  • 3

    The existing class whose members are being inherited is called a ______

    base class

  • 4

    Which syntax is correct where the class Student inherit from class "Person"?

    public class Student : Person { }

  • 5

    Members of a superclass are declared _______ if you want its subclasses to access its members.

    protected

  • 6

    In C#, the ____ keyword is used to specify which constructor from the base class should invoke when creating instances of the derived class.

    base

  • 7

    Which of the following syntax is correct when a derived class Student inherits the constructor of it's base class Person

    public Student(string name, int age, long id, string program) : base(name, age) { this.student_id = id; this.student_program = program; }

  • 8

    A derived class inherits the methods of its base class. Declaring a method in a derived class with the same name as the method from its base class is called _____________.

    method overriding

  • 9

    In C#, the overridden method from the base class should be declared as _____.

    virtual

  • 10

    When overriding a virtual method from the base class, the _______ modifier is required to modify the abstract or virtual implementation of the inherited method and must have the same method signature as the overridden method (virtual method).

    override

  • 11

    An __________ is a base class that cannot be instantiated to create an object.

    abstract class

  • 12

    Which syntax properly creates an abstract class of BankAccount?

    public abstract class BankAccount { }

  • 13

    Which syntax properly creates a abstract method named deposit

    public abstract void deposit(double amount);

  • 14

    ____________ which means “multiple forms,” is one of the fundamental concepts of object-oriented programming.

    Polymorphism

  • 15

    Also known as “static polymorphism,” this polymorphism is implemented using method overloading.

    Compile time polymorphism

  • 16

    This polymorphism is a process in which the compiler determines which method to call during runtime

    Runtime polymorphism

  • 17

    An _______ only contains the signatures of methods, properties, and events as its members. It is the responsibility of the class implementing the interface to provide the implementation of the members.

    interface

  • 18

    Which syntax properly creates a interface ITransactions

    public interface ITransactions { }

  • 19

    An interface cannot contain instance variables or fields but may contain __________.

    properties

  • 20

    Which syntax correctly creates properties for an interface IPerson, and set them accordingly.

    public interface IPerson { string first_name { get; set; } string last_name { get; set; } int age { get; set; } void setInfo(string FName, string LName, int year_old); }

  • 21

    What is the output of the following program when compiled and executed? using System; public abstract class Message { public abstract void printMessage(); public void printSomething() { Console.Write("Good morning!"); } } public class LocalMessage : Message { public override void printMessage() { Console.Write("Hello!"); } public static void Main(string[] args) { LocalMessage lm1 = new LocalMessage(); lm1.printMessage(); } }

    Hello!

  • 22

    What is the output of the following program when compiled and executed? using System; public class Number { protected int a = 0; } public class LocalNumber : Number { public void math() { Console.Write(this.a++); } public static void Main(string[] args) { LocalNumber ln1 = new LocalNumber(); ln1.math(); ln1.math(); } }

    01

  • 23

    Consider the following program: public class Number { private int number; public virtual void setNumber(int number) { this.number = number; } } public class LocalNumber : Number{ public override void setNumber(int number) { number = number + 5; base.setNumber(number); } } Which method is overridden?

    setNumber method from Number class

  • 24

    What is the value of the variable number when the following program is compiled and executed? using System; public abstract class Number { public abstract int getNumber(int x); } public class LocalNumber : Number { private int x = 5; public override int getNumber(int x) { return this.x+=x; } public static void Main(string[] args) { LocalNumber ln1 = new LocalNumber(); int number = ln1.getNumber(5); } }

    10