Uploaded by Dat Le

Quiz + FA21 CS-151 Sec 04 - Object Orntd Dsgn

advertisement
12/8/21, 1:29 AM
Quiz +: FA21: CS-151 Sec 04 - Object Orntd Dsgn
Quiz +
Due Sep 30 at 11:59pm
Points 40
Questions 27
Available until Dec 11 at 11:59pm
Time Limit 40 Minutes
Instructions
Instructions
This exam does not need LockDown browser.
This exam is closed all materials.
This exam is time sensitive and Canvas will submit your work automatically if time is over.
Use violet or the like for the UML diagrams.
Attempt History
LATEST
Attempt
Time
Score
Attempt 1
40 minutes
33.67 out of 40
Score for this quiz: 33.67 out of 40
Submitted Sep 30 at 11:11pm
This attempt took 40 minutes.
Question 1
1 / 1 pts
The subclass inherits all visible members of superclass.
Correct!
True
False
Question 2
1 / 1 pts
Java supports multiple-inheritance because it is very useful in programming.
https://sjsu.instructure.com/courses/1433269/quizzes/1513609
1/11
12/8/21, 1:29 AM
Quiz +: FA21: CS-151 Sec 04 - Object Orntd Dsgn
True
Correct!
False
Question 3
0 / 1 pts
Which one is the best answer about functional spec?
A. None of them are correct.
B. It describes how to solve the problem.
Correct Answer
C. Basically, it describes the required features.
You Answered
D. B and C are correct.
Question 4
1 / 1 pts
Creating a mockup of the final software helps to understand the software better.
Correct!
True
False
Question 5
0 / 1 pts
An object is an entity that has 3 properties: state, behavior, and name
You Answered
True
Correct Answer
False
https://sjsu.instructure.com/courses/1433269/quizzes/1513609
2/11
12/8/21, 1:29 AM
Quiz +: FA21: CS-151 Sec 04 - Object Orntd Dsgn
Question 6
1 / 1 pts
Class A is dependent on class B if class A uses class B.
Correct!
True
False
Question 7
1 / 1 pts
Software development process is not a linear progression through some phases.
Correct!
True
False
Question 8
1 / 1 pts
Objects are the instances of their classes.
Correct!
True
False
Question 9
1 / 1 pts
Dependency is a special case of aggregation.
True
https://sjsu.instructure.com/courses/1433269/quizzes/1513609
3/11
12/8/21, 1:29 AM
Correct!
Quiz +: FA21: CS-151 Sec 04 - Object Orntd Dsgn
False
Question 10
1 / 1 pts
Pick all true statement in OOP.
Correct!
Paradigm is a method for modeling and representing of the entities and the
relationship between them.
Correct!
In object-oriented paradigm, we model the entities of the real universe by "Objects".
Correct!
Behavior of an object is the set of the operations (or services) that object can do (or
give).
Identity of an object is the name we give to it.
Question 11
1 / 1 pts
To discover classes, we should look for verbs in the functional spec.
True
Correct!
False
Question 12
1 / 1 pts
To make an attribute write-only,
https://sjsu.instructure.com/courses/1433269/quizzes/1513609
4/11
12/8/21, 1:29 AM
Quiz +: FA21: CS-151 Sec 04 - Object Orntd Dsgn
we should add its getter.
Correct!
we should add its setter.
we should add its getter and setter.
none is correct.
Question 13
1 / 1 pts
Choosing the algorithms is the implementation concern.
Correct!
True
False
Question 14
0.67 / 1 pts
Which on is class member in OOP?
Correct!
Instance variables
Correct Answer
Attributes
Correct!
Methods
None is correct.
Question 15
1 / 1 pts
Which one is correct about functional spec?
https://sjsu.instructure.com/courses/1433269/quizzes/1513609
5/11
12/8/21, 1:29 AM
Quiz +: FA21: CS-151 Sec 04 - Object Orntd Dsgn
A. None of them are correct.
B. It describes how to solve the problem.
Correct!
C. Basically, it describes the required features.
D. B and C are correct.
Question 16
0 / 1 pts
We know that class Y inherits class X and X has a public method called aMeth that
is NOT overridden in Y. (Choose all true statements.)
To call aMeth in class Y, we have to use "super." keyword.
To call aMeth in class X, we have to use "this." keyword.
Correct Answer
To call aMeth in class Y, we can use "super." keyword optionally.
You Answered
None of them are correct.
Question 17
1 / 1 pts
Choosing the programming language is the design concern.
True
Correct!
False
Question 18
1 / 1 pts
Object-oriented design methodology can deal with change and complexity.
https://sjsu.instructure.com/courses/1433269/quizzes/1513609
6/11
12/8/21, 1:29 AM
Correct!
Quiz +: FA21: CS-151 Sec 04 - Object Orntd Dsgn
True
False
Question 19
1 / 1 pts
The criteria for testing an application is its functional spec.
Correct!
True
False
Question 20
1 / 1 pts
Choose all true statements.
Correct!
A class tagged as final cannot be sub-classed (extended, or inherited).
Correct!
A method tagged as final cannot be overridden.
Correct!
An attribute tagged as final cannot be altered.
None of them are correct.
Question 21
2 / 2 pts
What are the fundamental concepts of OOP?
Your Answer:
https://sjsu.instructure.com/courses/1433269/quizzes/1513609
7/11
12/8/21, 1:29 AM
Quiz +: FA21: CS-151 Sec 04 - Object Orntd Dsgn
OOP has 4 fundamental concepts:
Abstraction
Polymorphism
Inheritance
Encapsulation
Question 22
2 / 2 pts
What is the definition of mutable class?
Your Answer:
If an object's state can be changed, we call its class "mutable"
Question 23
2 / 2 pts
What is the definition of interface (or API) of a class?
Your Answer:
The set of visible members of the class
Question 24
https://sjsu.instructure.com/courses/1433269/quizzes/1513609
2 / 2 pts
8/11
12/8/21, 1:29 AM
Quiz +: FA21: CS-151 Sec 04 - Object Orntd Dsgn
What are the 5 phases out of 7 phases into which we break up the software
development process?
Your Answer:
Analysis
Design
Implementation
Testing
Delivery
2 / 2 pts
Question 25
What is the definition of "encapsulation" in OOP?
Your Answer:
The ability of bundling attributes and behaviors (in a class) and controlling
attributes, behaviors and class' visibility
Question 26
3.5 / 4 pts
We have Product class and we are going to create the OnlineCart class.
Draw a class diagram that shows how you aggregate Product class in the
OnlineCart class.
Multiplicity are required and the relationships are unidirectional.
https://sjsu.instructure.com/courses/1433269/quizzes/1513609
9/11
12/8/21, 1:29 AM
Quiz +: FA21: CS-151 Sec 04 - Object Orntd Dsgn
Your Answer:
Question 27
3.5 / 6 pts
Assume we have the following classes: Customer, Product, CreditCard and we
are going to create the Order class.
Draw one class diagram that shows how you aggregate the above classes in the
Order class.
Multiplicity are required and the relationships are unidirectional.
https://sjsu.instructure.com/courses/1433269/quizzes/1513609
10/11
12/8/21, 1:29 AM
Quiz +: FA21: CS-151 Sec 04 - Object Orntd Dsgn
Your Answer:
Quiz Score: 33.67 out of 40
https://sjsu.instructure.com/courses/1433269/quizzes/1513609
11/11
Download