TOP 20 câu hỏi trắc nghiệm ôn tập học phần Computer Science | Trường Đại học Quốc tế, Đại học Quốc gia Thành phố Hồ Chí Minh

Like C++, Java requires that you delete objects from memory when you are finished with that object? Object-oriented (OO) programming can improve programmer efficiency, compared to non-OO programming? All the following statements are rules of constructor chaining except? Overloaded constructors must have different signatures. The compiler chooses the constructor to call based on the constructor signature? Tài liệu giúp bạn tham khảo, ôn tập và đạt kết quả cao. Mời bạn đón xem. 

Môn:

Computer Science 2 tài liệu

Thông tin:
5 trang 1 tháng trước

Bình luận

Vui lòng đăng nhập hoặc đăng ký để gửi bình luận.

TOP 20 câu hỏi trắc nghiệm ôn tập học phần Computer Science | Trường Đại học Quốc tế, Đại học Quốc gia Thành phố Hồ Chí Minh

Like C++, Java requires that you delete objects from memory when you are finished with that object? Object-oriented (OO) programming can improve programmer efficiency, compared to non-OO programming? All the following statements are rules of constructor chaining except? Overloaded constructors must have different signatures. The compiler chooses the constructor to call based on the constructor signature? Tài liệu giúp bạn tham khảo, ôn tập và đạt kết quả cao. Mời bạn đón xem. 

39 20 lượt tải Tải xuống
Constructors can be overloaded.
Queson 1 opons:
True
False
Queson 2 (1 point)
Like C++, Java requires that you delete objects from memory when you are nished with that object.
Queson 2 opons:
True
False
Queson 3 (0.5 points)
Object-oriented (OO) programming can improve programmer eciency, compared to non-OO
programming.
Queson 3 opons:
True
False
Queson 4 (0.5 points)
It is possible - and possibly good programming - to make methods private. Queson 4 opons:
True
False
Queson 5 (1 point)
All the following statements are rules of constructor chaining except:
Queson 5 opons:
Use the this() expression as the rst line of the constructor
There must be one constructor in the class
There must be at least one constructor without this() expression
All of the above answers are correct
Queson 6 (1 point)
Overloaded constructors must have dierent signatures. The compiler chooses the constructor to call
based on the constructor signature.
Queson 6 opons:
True
False
Queson 7 (1 point)
Objects are just soware and can't do things like aributes and behaviours.
Queson 7 opons:
True
False
Queson 8 (1 point)
Which Boolean operator is not used in Java programming? Queson 8 opons:
NOT
AND
XOR
OR
Queson 9 (1 point)
All of the following are main concepts of object-oriented programming except:
Queson 9 opons:
encapsulaon and polymorphism procedural
programming
All of the answers in A and B are correct
None of the answers in A and B are correct
Queson 10 (1 point)
Object-oriented programming allows you to implement an object-oriented design as a working
system. Java is only partly object-oriented. Queson 10 opons: True
False
Queson 11 (1 point)
Java math follows a set order of operaons idencal to algebra.
Queson 11 opons:
True
False
Queson 12 (1 point)
Consider the code: for (int i=0;i<6;i++) { i++; //other code } Is there a beer way to make a for
loop that counts by values of 2? Queson 12 opons: True
False
Queson 13 (0.5 points) You can show operaons in a UML diagram by lisng the name of the
operaon and then a set of parentheses. (Parentheses are the round brackets.)
Queson 13 opons:
True
False
Queson 14 (2 points) Queson 14
opons:
Same return type name
Number of parameters
All of the above are correct
Queson 15 (2 points)
Queson 15 opons:
Correct and can be used in the program
Wrong and cannot be used in the program
Correct, but can only be used as elds
Correct, but will only compile in some versions of Java
Queson 16 (1 point)
As a good programmer you can assume that users are always friendly, use your soware awlessly,
and never enter bad values. Queson 16 opons:
True
False
Queson 17 (0.5 points)
An object is referred to as an instance of a its class. A class can only have one special method called a
constructor that instanates an object.
Queson 17 opons:
True
False
Queson 18 (1 point) Java requires a constructor call only for large objects. Small objects never use
no constructors.
Queson 18 opons:
True
False
Queson 19 (1 point)
Constructor chaining can only happen in a specic order.
Queson 19 opons:
True
False
Queson 20 (1 point)
"Constructor chaining" is the term for when you call constructors from outside the class. Queson 20
opons:
True
False
| 1/5

Preview text:

Constructors can be overloaded. Question 1 options: True False Question 2 (1 point)
Like C++, Java requires that you delete objects from memory when you are finished with that object. Question 2 options: True False Question 3 (0.5 points)
Object-oriented (OO) programming can improve programmer efficiency, compared to non-OO programming. Question 3 options: True False Question 4 (0.5 points)
It is possible - and possibly good programming - to make methods private. Question 4 options: True False Question 5 (1 point)
All the following statements are rules of constructor chaining except: Question 5 options:
Use the this() expression as the first line of the constructor
There must be one constructor in the class
There must be at least one constructor without this() expression
All of the above answers are correct Question 6 (1 point)
Overloaded constructors must have different signatures. The compiler chooses the constructor to call
based on the constructor signature. Question 6 options: True False Question 7 (1 point)
Objects are just software and can't do things like attributes and behaviours. Question 7 options: True False Question 8 (1 point)
Which Boolean operator is not used in Java programming? Question 8 options: NOT AND XOR OR Question 9 (1 point)
All of the following are main concepts of object-oriented programming except: Question 9 options:
encapsulation and polymorphism procedural programming
All of the answers in A and B are correct
None of the answers in A and B are correct Question 10 (1 point)
Object-oriented programming allows you to implement an object-oriented design as a working
system. Java is only partly object-oriented. Question 10 options: True False Question 11 (1 point)
Java math follows a set order of operations identical to algebra. Question 11 options: True False Question 12 (1 point)
Consider the code: for (int i=0;i<6;i++) { i++; //other code } Is there a better way to make a for
loop that counts by values of 2? Question 12 options: True False
Question 13 (0.5 points) You can show operations in a UML diagram by listing the name of the
operation and then a set of parentheses. (Parentheses are the round brackets.) Question 13 options: True False
Question 14 (2 points) Question 14 options: Same return type name Number of parameters All of the above are correct Question 15 (2 points) Question 15 options:
Correct and can be used in the program
Wrong and cannot be used in the program
Correct, but can only be used as fields
Correct, but will only compile in some versions of Java Question 16 (1 point)
As a good programmer you can assume that users are always friendly, use your software flawlessly,
and never enter bad values. Question 16 options: True False Question 17 (0.5 points)
An object is referred to as an instance of a its class. A class can only have one special method called a
constructor that instantiates an object. Question 17 options: True False
Question 18 (1 point) Java requires a constructor call only for large objects. Small objects never use no constructors. Question 18 options: True False Question 19 (1 point)
Constructor chaining can only happen in a specific order. Question 19 options: True False Question 20 (1 point)
"Constructor chaining" is the term for when you call constructors from outside the class. Question 20 options: True False