SE Duc ML

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

1. An operation’s parameter can not be attached to an annotation?

Select one:
a. False
b. True

1. Both Java and C# support some form of annotation.


Select one:
a. False
b. True

2. What is the main motivation for using an annotation in OOP design?


Select one:
a. Design is not an OOP one without annotations
b. Helps define the design rules explicitly
c. Design is incorrect without annotations
d. Design must be defined using annotation

2. What are the main parts of a class design?


Select one:
a. Class diagram, attribute representation, operation header
b. Class overview, attributes, operations
c. Class header, class representation, operations
d. Class header, object representation, operations

3. Behaviour differs from implementation (coding) because?


Select one:
a. It describes what rather how a procedure performs
b. It describes how rather what a procedure performs
c. It formats the code in the Javadoc format

3. Design specification of an object procedure consists of?


Select one:
a. Header code and behaviour header
b. Header and behaviour description
c. Header behaviour and description
d. Header description and behaviour code

4. The essential constraints on an attribute include


Select one:
a. Value length, value range
b. None of the other choices
c. Length, min length, max length
d. Length, min, max
4. The essential constraints on an attribute include
Select one
a. Length, min length, max length
b. Value length, value range
c. None of the other choices
d. Length, min, max

4. What does the optional constraint on an attribute mean?


Select one:
a. Whether or not the attribute’s can be defined in the class
b. Whether or not the attribute’s value must be initialised
c. Whether or not the attribute can be turned off
d. Whether or not the attribute can be defined with the keyword “optional”

5. Concrete date type means that


Select one:
a. It is fixed and can not be changed
b. It is fixed but can be changed by the user
c. It is defined by the class named Concrete
d. It realises the formal data type in an OOPL

5. Concrete data type means that


Select one:
a. It realises the formal data type in an OOPL
b. It is defined by the class named Concrete
c. It is fixed and can not be changed
d. It is fixed but can be changed by the user

Questions 6 - 15 concern the following scenario. Given the UML class diagram of a class
named Employee

Employee

- fullName: String

A
B
C
D
E

6. Write the design specification for the attribute Employee.fullName. Your specification must
include the essential constraints which are determined based on your practical understanding of
a person’s date of birth.
@DomainConstraint(type = “String”, mutable = true, optional = false, length = 100)

public String fullName;

7. Operation A is an essential operation for creating Employee objects.


Write the design specification for this operation.

/**
* @effects <pre>
* if fullName is valid
* initialize this as Employee:<fullName>
* else
* print error message
* </pre>
*/

8. Write the code for operation A.

public Employee(@AttrRef(“fullName”) String fullName) throws NotPossibleException {


if (!validateName(fullName)) {
throw new NotPossibleException(“Employee.init: Invalid Employee name: ” +
fullName);
}
this.fullName = fullName;
}

9. Operation B is a mutator operation for attribute Employee.fullName. Write the design


specification for this operation.

/**
* @effects <pre>
* if fullName is valid
* set this.fullName = fullName
* return true
* else
* return false</pre>
*/

10. Write the code of the operation B.

@DOpt(type=OptType.Mutator)
@AttrRef("fullName")
public boolean setName (String n) {
if (validateName(n)) {
this.name = n;
return true;
}
else {
return false;
}
}

11. Operation C is a helper operation that validates input value for attribute Employee.fullName.
Write the design specification for this operation.

/**
* @effects <pre>
* if name is valid
* return true
* else
* return false</pre>
*/

12. Write the code for operation C.

private boolean validateName(String name) {


return (name != null && name.length() > 0 && name. length() <= 100);
}

Which of the followings best describes software engineering?

Select one:

a produce large and complex software for important purposes

b. a method to automatically produce software using machinery

Flag question

c. the application of a disciplined process to the development of software

d. help programmers to effectively use a programming language to code a software

Which of the followings is the name of a software engineering process model?

Select one:
a. development cycle

b. spine

c. waterfall

d. step-wise

e. decomposition by abstraction

The spiral process model

Select one:

a. organise the phases in iterations with feedbacks between phases

b. organise the phases in two pairs: two upper and two lower phases

c. organise the phases in a never-ending spiral shape

d. organise the phases in four separate quarters

Question 19

Why is it difficult to build a good software?

Select one:

a. a good software requires a lot of natural resources to develop

b. there is a lack of software engineering standards

c. programmers do not want to use software engineering standards

d. software has many interactions within it and with other systems

e. there is a lack of good programmers in the industry

The agile process model

Select one:

a. employs the client to work as an employee in the development team

b. involves working closely with the clients to develop software


c. emphasises on documenting the interaction with the customers

d. divides the development process into increments of 2-3 months

Question 21

Which of the followings is the name of an object oriented modelling language?

Select one:

a. unified modelling specification

b. universal object modelling

c. unified modelling system

d. uniform modelling language

e. unified modelling language

Which of the followings are parts of a use case description?

Select one:

a. database, response, description, data

b. user, constraint, reply, input

c. stimuli, user, database, reply

d. actor, data, response, stimuli

Question 23

Which of the followings best describes a statement about the input data of a software?

a. all popular science-fiction books are entered into the system by data entry staff

b. every staff is employed by the book shop to work full-time

c. a customer asks a sales staff to search for documents about a book

d. a customer has name, date of birth, and address

Which of the followings is the input for software design?


a. requirement specification

b. user requirements

c. software requirements

d. requirement analysis

e. requirement engineering

Question 25

Which of the followings lists the types of non-functional requirements?

Select one:

a. performance, reusability

b. modifier, performance

c. accuracy, modifier

d. reusability, accuracy

26 . the requirement specification of a software function


select one
a. describes the detailed input and output of the function
b. defines the function with all required information
c. does not include the return type nor the pre-conditions
d. makes precise the pre- and post-conditions of the function

27. Which of the following is a constraint on an attribute?


a. each document may have one or more words
b. a word may appear in one or more documents
c. a document matches a query if it contains all of the query’s keywords
d. the frequency of each word in a document is the number of its occurrences

28 Which of the following lists the basic modeling constructs of an UML class diagram?
a. class, association
b. relationship, entity
c. class, relationship
d. entity, association
e. class, entity
29 What is the primary purpose of a use case diagram?
a. to describe the details of all the use cases of the software
b. to show how the software operates in different situations
c. to show the user interactions in different scenarios
d. to show a diagram of how to use the system
30 the requirement specification language
a. is a programming language that the developer uses
b. is a mathematical language that makes precise the requirements
c. i adapted from the design specification language
d. is a natural language that the end user communicates
31 Which of the following best describes the output of object oriented software design?
a. detailed requirement specification and diagrams
b. design specification and diagrams
c. design models and diagrams
d. functional design specification and diagrams
e. data design specification and diagrams
32 What are the first two design iterations called?
a. important and key abstractions
b. beginning and preparation
c. preparation and starting
d. initial and top-level abstractions
33 Which of the following best describes the object-oriented design technique named
“decomposition by abstraction”?
a. decompose a system into functions and to create/use procedures to perform them
b. decompose each a system into classes and to create/use methods of these classes
c. decompose each software function and create/use abstractions as required to perform to
functions
d. iteratively decompose a system into smaller systems
34 Which of the following is the goal of software design?
a. to write a software specification for the users to understand
b. to construct a detailed drawing of the software
c. to construct the precise specification for how the software wil perform
d. to write a software specification for the designer to understand
35 design refinement means
a. incrementally product a more refined product
b. iteratively make the design size smaller
c. iteratively cut the design into smaller elements
d. incrementally add detail and precision to the design

You might also like