You are on page 1of 47

Danh mục tài liệu tham khảo .........................................................................................................................................................................................

3
[1] Slides .............................................................................................................................................................................................................. 3
[1.1] Project Orientation ........................................................................................................................................................................................ 3
[1.2] Introduction to Teamwork.............................................................................................................................................................................. 3
[1.3] Using Processes ............................................................................................................................................................................................. 3
[1.4] Defining a Technical Review Process ............................................................................................................................................................ 3
[1.5] Reviewing the Review Process ....................................................................................................................................................................... 3
[1.6] Technical Review of Code .............................................................................................................................................................................. 3
[1.7] Defining a Configuration Management Process............................................................................................................................................ 3
[1.8] Using Your Configuration Management Processes ....................................................................................................................................... 3
[1.9] Analyzing and Fixing Defects ........................................................................................................................................................................ 3
[1.10] Refactoring ................................................................................................................................................................................................. 3
[1.11] Analyzing & Estimating Requirements ..................................................................................................................................................... 3
[1.12] Testing and Quality .................................................................................................................................................................................... 3
[1.13] Customer Satisfaction ................................................................................................................................................................................ 3
[2] Ian Sommerville. Software engineering update 8th edition. Wesley Computer Publishing 2007. ............................................................... 3
[3] Steve McConnell. Code Complete - Second Edition. ISBN: 1-55615-484-4, 2004 ........................................................................................ 4
[4] Fowler, Beck, Brant-Opdyke, Roberts Refactoring Improving the Design of Existing Code .......................................................................... 4
[5] Wikipedia ....................................................................................................................................................................................................... 4
Nội dung câu hỏi ............................................................................................................................................................................................................ 5
1. Phần trắc nghiệm ............................................................................................................................................................................................... 5
1.1. Introduction to Teamwork ......................................................................................................................................................................... 5
1.2. Using Processes ......................................................................................................................................................................................... 7
1.3. Technical Review ....................................................................................................................................................................................... 9
1.4. Configuration Management ..................................................................................................................................................................... 14
1.5. Testing and Quality .................................................................................................................................................................................. 20
1.6. Analyzing and Fixing Defects .................................................................................................................................................................. 22
1.7. Refactoring ............................................................................................................................................................................................... 24
1.8. Analyzing & Estimating Requirements ................................................................................................................................................... 26
1.9. Customer Satisfaction .............................................................................................................................................................................. 28
2. Phần tự luận ..................................................................................................................................................................................................... 29
2.1. Testing and Quality ...................................................................................................................................................................................... 29
2.2. Refactoring................................................................................................................................................................................................... 38
Danh mục tài liệu tham khảo
[1] Slides
[1.1] Project Orientation

[1.2] Introduction to Teamwork

[1.3] Using Processes

[1.4] Defining a Technical Review Process

[1.5] Reviewing the Review Process

[1.6] Technical Review of Code

[1.7] Defining a Configuration Management Process

[1.8] Using Your Configuration Management Processes

[1.9] Analyzing and Fixing Defects

[1.10] Refactoring

[1.11] Analyzing & Estimating Requirements

[1.12] Testing and Quality

[1.13] Customer Satisfaction

[2] Ian Sommerville. Software engineering update 8th edition. Wesley Computer Publishing 2007.
[3] Steve McConnell. Code Complete - Second Edition. ISBN: 1-55615-484-4, 2004

[4] Fowler, Beck, Brant, Roberts Refactoring Improving the Design of Existing Code

[5] Wikipedia
Nội dung câu hỏi
1. Phần trắc nghiệm
1.1. Introduction to Teamwork
Index Question Result CLO SO Level Ref

Which statement is true about teamwork?


A. The team will need to build trust
B. The team will need to build in the rule of contract A CLO.1 B 5 [1.1]
C. Everyone on the team must have a high degree
1 D. The leader must have the highest degree and salary
Why do we need to build the teamwork?
A. The software projects are too large and those a diverse set of skills and
roles
A CLO.1 B 2 [1.2]
B. Experienced programmers who will teach those less experienced
C. To do inspection
2 D. To prevent defects
In tips for receiving feedback, when you listen carefully and try to
understand the meaning of the feedback, what is this kind of technic
called?
A. Open C CLO.1 B 4 [1.2]
B. Active listening
C. Thoughtful
3 D. Responsive
Role of a team leader in helping all members working together:
A. Manage the technique of the project
B. Suppress ego of each member B CLO.1 B 7 [1.2]
C. Help all members write codes
4 D. Manage the quality of the project
What is the characteristic of high-performance teams in company
mission?
A. A clear, elevating goal
A CLO.1 B 6 [1.2]
B. Competent team members
C. Unified commitment
5 D. A results-driven structure

What is the characteristic of high-performance teams when your


company gets CMM standard?
A. Unified commitment D CLO.1 B 9 [1.2]
B. Collaborative climate
C. Standards of excellence
6 D. External support and recognition
What are team member’s competitions?
A. Technical
B. Personal D CLO.1 B 1 [1.2]
C. Salary
7 D. A and B are correct

Positive receiving feedback, listen without frequent interruption or


objections is...
A. Open A CLO.1 B 3 [1.2]
B. Active listening
C. Thoughtful
8 D. Responsive
What is the difference between team and group?
A. Product
B. Salary C CLO.1 B 5 [1.2]
C. Result
9 D. Strength
What is the characteristic of high-performance teams when you share
knowledge with all team members?
A. Unified commitment B CLO.1 B 4 [1.2]
B. Collaborative climate
C. Standards of excellence
10 D. External support and recognition

1.2. Using Processes


Index Question Result CLO SO Level Ref
1 [1.3]
How do we define a Process?
A. Input - Process – Output
B. Process - Input- Output CLO.1 B
C. Output - Input – Process
1 D. Process - Output – Input A
4 [1.3]
What are the ways to create a process?
A. ETVX
B. ETVX, Swimlane CLO.1 B
C. ETVX, Swimlane, Waterfall
2 D. ETVX, Swimlane, Black box B
6 [1.3]
In the software project, how many processes should be used?
A. As less as possible
B. As much as possible CLO.1 B
C. Only one
3 D. Depend on what process we know. A
2 [1.3]
The best period of time for one Sprint Backlogs in Scrum process is?
A. 2->4 weeks
B. 3->5 weeks CLO.1 B
C. one week
4 D. one month
3 [1.3]
The process you can see insight is…
A. White Box
B. Black Box CLO.1 B
C. A and B are correct
5 D. A and B are not correct A
2 [1.3]
"Process is often described as a leg of the…"
A. process-knowledge-technology triad
B. process-people-money triad CLO.1 B
C. process-people-technology triad
6 D. process -money-technology triad C
6 [1.3]
What is the correct stage order?
A. Task, Entry, Validation, Exit
B. Entry, Validation, Task, Exit CLO.1 B
C. Exit, Validation, Task, Entry
7 D. Entry, Task, Validation, Exit D
5 [1.3]
It is better to use process in a (an)…
A. Individual
B. Small team CLO.1 B
C. Large Team
8 D. Other solution C
8 [1.3]
What are the fundamentals of Software Quality Process?
A. The requirement, Analysis, Code
B. User documentation, User supports CLO.1 B
C. Review, Testing...
9 D. All above C
7 [1.3]
What are the fundamentals of Software Development Process?
A. The requirement, Analysis, Code
B. User documentation, User supports CLO.1 B
C. Review, Testing...
10 D. All above A
1.3. Technical Review
Index Question Result CLO SO Level Ref
What are the types of technical review? 1 [1.4]
A. Walkthroughs, Code Reading, Pair Programming, Inspections
B. Code Reading, Pair Programming, Inspections
C. Walkthroughs, Code Reading, Pair Programming, Inspections,
Customer Review
1 D. Code Reading, Pair Programming A CLO.1 B
3 [1.4]
What is the name of inspection process?
A. Software inspection
B. Code inspection
C. Fagan inspection
2 D. All above D CLO.1 B
2 [1.4]
What is the result of the review?
A. Checklist
B. Inspection Report.
C. Code Defect
3 D. All above D CLO.1 B
5 [1.4]
What is Pair Programming?
A. A teamwork using Cisco tool to review code
B. Two coders read and inspection code of each other
C. A meeting of project's stakeholder
4 D. All above B CLO.1 B
4 [1.4]

What are the steps of Inspection Process?


A. Planning, Overview, Meeting, Rework, Follow-up
B. Planning, Meeting, Rework, Follow-up
C. Planning, Preparation, Meeting, Rework
5 D. Planning, Overview, Preparation, Meeting, Rework, Follow-up D CLO.1 B
3 [1.5]
Who are involved in the inspection meeting?
A. Author, Inspector
B. Moderator, Recorder
C. Reader / Timekeeper
6 D. All above D CLO.1 B
3 [1.5]
What are the benefits of the inspection?
A. Found and remove defects early
B. Training for anyone on the team
C. The inspected codes are good enough for release
7 D. A and B are correct D CLO.1 B
Which statement is TRUE when you are exanimating technical review? 8 [1.5]
A. Technical Reviews help remove defects and prevent future defects
B. Projects with the technical review are higher quality than without
another
C. Traditional projects do not need review
8 D. Agile projects do not need review A CLO.1 B
5 [1.5]
According to Capers Jones in “Software Defect Removal Efficiency,
Design and Code Inspections” usually remove ... of product defects
A. 40%
B. 50 - 60%
C. 60 - 70%
9 D. 70 - 85% D CLO.1 B
5 [1.5]

According to Votta in "Does every inspection need a meeting" -


8/1993, Inspection meetings contribute only an additional ... to the
number of defects were already found by private code-readings
A. 4%
B. 10%
C. 20%
10 D. 50% A CLO.1 B
5 [1.5]
According to Conradi in Architecture Reviews, when they using 25%
times for reading and 75% times for a meeting, so ...of the defects
were found during reading
A. Less than 80%
B. More than 80%
C. Less than 40%
11 D. More than 40% A CLO.1 B
4 [1.5]
All studies of Inspection have common results, the meeting will find
very few errors compared to the reading code. Why are many
companies still inspecting the code by meeting?
A. They use inspection for training
B. Inspection can find the defect that the individual couldn’t found
C. Meetings create a schedule that people must work towards
12 D. All above D CLO.1 B
4 [1.5]
What are three types of Object Oriented 's review?
A. checklist review, systematic review, use-case review
B. checklist review, Diagram review, use-case review
C. checklist review, Diagram review, Code review
13 D. checklist review, systematic review, use review A CLO.1 B
7 [1.5]
What is the most successful type of Object Oriented's review?
A. Checklist review
B. Systematic review
C. Use-case review
14 D. No solution is true A CLO.1 B
5 [1.5]
What is the maximum time to peer code review?
A. 30 minutes
B. 60 minutes
C. 90 minutes
15 D. 120 minutes C CLO.1 B
9 [1.5]
In the Cisco Collaborate tool, what are the roles in a review?
A. Author, Reviewer, Moderator
B. Author, Reviewer, Observer
C. Author, Inspector, TimeKeeper/Reader, Recorder
16 D. All above B CLO.1 B
5 [1.5]
What are the roles in the inspection process?
A. Author, Reviewer, Moderator
B. Author, Reviewer, Observer
C. Author, Inspector, Moderator, TimeKeeper/Reader, Recorder
17 D. B and C are correct C CLO.1 B
When you create a review by using Cisco Collaborate, what roles must 7 [1.5]
be included?
A. Author, Moderator
B. Reviewer, Moderator
C. Moderator, Observer
18 D. Author, Reviewer C CLO.1 B
When you use inspection process, what roles must be included? 5 [1.5]
A. Author, Moderator, Inspector
B. Reviewer, Moderator, Inspector
C. Moderator, Observer, Inspector
19 D. Author, Reviewer, Inspector B CLO.1 B
3 [1.5]
Cisco Collaborate tool is used to:
A. Review code
B. Share code
C. Cross training
20 D. All above A CLO.1 B
6 [1.5]
Cisco tool is run on:
A. Desktop Application environment
B. Client/Server environment
C. Web Application environment
21 D. All above B CLO.1 B
2 [1.5]
What is SCM?
A. Software Configuration Management
B. System Configuration Management
C. Software Change Management
22 D. System Change Management A CLO.1 B
5 [1.5]
Which is stage efficiency for finding code defects?
A. Meeting
B. Discussing with the author
C. Reading
23 D. A, B, C are not correct C CLO.1 B
5 [1.5]
What is the responsibility of Inspector?
A. Control the time of the meeting
B. Read the document and prepare to review at the meeting
C. Do nothing before meeting
24 D. A and B are correct B CLO.1 B
Which review that the participants do not need to prepare or read the 7 [1.5]
material?
A. Inspection
B. Pair programming
C. Code Reading
25 D. Walkthrough A CLO.1 B
4 [1.5]
Which phase of inspection is used to choose inspectors?
A. Planning
B. Overview
C. Preparation
26 D. Meeting A CLO.1 B
4 [1.5]
What is code defect in Technical Review?
A. The program cannot run
B. The code must be rewriting
C. Algorithms fail
27 D. The codes are hard to understand B CLO.1 B
4 [1.5]
All studies of Inspection have common results, the meeting will find
very few errors compared to the reading code. Why are many
companies still inspecting the code by meeting?
A. They use inspection for training
B. Inspection can find the defect that the individual couldn't found
C. Meetings create a schedule that people must work towards
28 D. All above D CLO.1 B
5 [1.5]
What is the most formal technical review?
A. Walkthroughs
B. Code Reading
C. Pair Programming
29 D. Inspections D CLO.1 B
5 [1.5]
What is the most informal technical review?
A. Walkthroughs
B. Code Reading
C. Pair Programming
30 D. Inspections A CLO.1 B

1.4. Configuration Management


Index Question Result CLO SO Level Ref
3 [1.7]
What is SCM?
A. Software Configuration Management
B. System Configuration Management
C. Software Change Management
1 D. System Change Management A CLO.2 B
2 [1.7]
SCM is used to ….
A. Build Project
B. Manage the revision of the project
C. Share document and code
2 D. Review code B CLO.2 B
5 [1.7]
What are the steps to work with SCM?
A. Checks out, Work in received data, Checks in updated
B. Work on received data, Checks in updated, Checks out
C. Checks in updated, Checks out, Work in received data
3 D. Checks out, Checks in updated, Work in received data A CLO.2 B
If Software Engineer2 checks in a file when Software Engineer1 has 9 [1.7]
checked in it. What will SCM system do?
A. SCM system will automatically merge the files when they are checked
in
B. SCM system will create a new revision of that checked out file
C. SCM system will overwrite the file of Engineer2 to Engineer1's
4 D. The SCM system does not allow Engineer2's check-out A CLO.2 B
4 [1.7]
The version of the software is 1.01.0012. The number 0012 means….
A. the Major Release Number
B. the Minor (Maintenance) Release Number
C. the Build Number
5 D. the revision C CLO.2 B
4 [1.7]
The version of the software is 1.01.0012. The number 1 means….
A. the Major Release Number
B. the Minor (Maintenance) Release Number
C. the Build Number
6 D. the revision A CLO.2 B
4 [1.7]
The version of the software is 1.02.0012. The number 02 means….
A. the Major Release Number
B. the Minor (Maintenance) Release Number
C. the Build Number
7 D. the revision B CLO.2 B
What is the right definition about Eclipse? 8 [4]
A. Eclipse is an SCM, it used to manage the revision of the code
B. Eclipse is an interactive development environment (IDE) used to edit,
debug source code, initiate build, test processes and display the results
C. An eclipse is a review tool, it used to review the code of large
teamwork
D. Eclipse is a program that automatically builds your Java project from
source files in your SVN repository and creates the project distribution
8 packages B CLO.2 B
2 [1.7]
For Eclipse to work with SVN, which tool must you add to Eclipse?
A. subversive
B. Ant
C. Maker
9 D. SVN client A CLO.2 B
9 [1.7]
By default, the password of admin user of Cisco Collaborate tool is
A. 123456
B. 1234
C. admin
10 D. other solution D CLO.2 B
5 [1.7]
What is the name of the SVN software installed in client?
A. SVN Client
B. User SVN
C. Tortoise SVN
11 D. ANT C CLO.2 B
What is the right definition of Ant? 8 [4]
A. ANT is an SCM, it used to manage the revision of the code
B. ANT is an interactive development environment (IDE) used to edit,
debug source code, initiate build, test processes and display the results
C. ANT a review tool, it used to review the code of large teamwork
D. ANT is a program that automatically builds your Java project from
source files in your SVN repository and creates the project distribution
12 packages D CLO.2 B
4 [1.7]
In order to use Eclipse, you must ….
A. install the current version of Java Development Kit on your computer
B. install the current version of Tomcat on your computer
C. install the current version of SVN on your computer
13 D. install the current version of ANT on your computer A CLO.2 B
3 [1.7]
SVN is an abbreviation of…..
A. System version naming
B. Subversion
C. Software version naming
14 D. None of the above B CLO.2 B
7 [1.8]
In software project development, who usually does the unit test?
A. Tester
B. Developer (coder)
C. Customer
15 D. Designer B CLO.2 B
4 [1.8]
Which library supports unit test in Eclipse?
A. junit.framework.TestCase
B. org.junit.Test
C. java.junit
16 D. A and B are correct D CLO.2 B
2 [1.8]
Developers transfer codes and test-case to….
A. Tester
B. Developer (coder)
C. Customer
17 D. Designer A CLO.2 B
3 [1.8]
JUnit is used to …..
A. Review code
B. Find defect
C. Refactoring
18 D. Manage the revision of the project B CLO.2 B
7 [1.8]
What are defects in coding phase?
A. programming errors
B. poorness design
C. poorness coding practices
19 D. poorness understanding of requirements A CLO.2 B
6 [1.8]
What does the AssertTrue() method do?
A. Compare actual and expected value
B. Check the parameter is true or false
C. Let the method fail
20 D. All above B CLO.2 B
6 [1.8]
What does the AssertEquals() method do?
A. Compare actual and expected value
B. Check the parameter is true or false
C. Let the method fail
21 D. All above A CLO.2 B
3 [1.8]
CruiseControl was written in?
A. SVN, ANT
B. SVN, Eclipse
C. Eclipse, ANT
22 D. ANT, Junit C CLO.2 B
4 [1.8]
Why do we choose CruiseControl in our SCM system?
A. Because QA can create a schedule for building and testing
B. Because it can send email notifications of building status
C. Because it can store codes
23 D. All above D CLO.2 B
5 [1.8]
When the Unit test results display 1 error. That means…
A. The first test case is failures
B. The first test case is pass
C. Exist at least 1 error in codes
24 D. A and C are correct C CLO.2 B
5 [1.8]
When the Unit test results display 1 failure. That means…
A. The actual and expected value are not the same
B. The first test case is a failure
C. The testing code has 1 error
25 D. B or C is correct A CLO.2 B
8 [1.8]
When you create a test with JUnit by eclipse. The default unit test
class name is …
A. Class name + “Test”
B. Class name + “UnitTest”
C. Blank
26 D. Class name A CLO.2 B
4 [1.8]
Which error is found by the unit testing?
A. Execute
B. Code standard
C. Syntax
27 D. all of the above A CLO.2 A
3 [1.8]
ANT is used to ….
A. Build Project
B. Manage the revision of the project
C. Share document and code
28 D. Review code A CLO.2 B
2 [1.8]
CruiseControl can...
A. Automatically build
B. Automatically test
C. Manage Email notification, Log
29 D. All above D CLO.2 B
4 [1.8]
For building java project using ANT, you must write config file in …
A. Java language
B. HTML language
C. XML language
30 D. A and C are correct C CLO.2 B
1.5. Testing and Quality
Index Question Result CLO SO Level Ref
5 [1.9]
If your code has unrecognized defects, what will you do?
A. Change the test-case and do Unit-Test again
B. Write another code to replace it
C. Let the tester find
1 D. Do nothing A CLO.4 K
5 [1.9]
What is the best way to find defects from a function with numerous
lines of code?
A. Change the test-case and do Unit-Test again
B. Isolate the suspicious regions of code
C. Check code that has changed recently
2 D. Be suspicious of classes and methods that have had defects before B CLO.4 K
5 [1.9]
If your code has errors but you can't find the defect for many hours.
What is the best way you should do?
A. Check for common defects
B. Check code that has changed recently
C. Isolate the suspicious regions of code
3 D. Take a break D CLO.4 K
3 [1.9]
In conducting phase. It is a Defect if…
A. The algorithm is wrong.
B. The code is right but unintelligible due to poor documentation.
C. The code is right but there’s a better way to do it
4 D. All above. A CLO.4 K
2 [1.9]
What is the characteristic of software quality that you can achieve if
you try to find and fix defects?
A. Accessibility
B. Safety
C. Performance
5 D. Correctness D CLO.4 K
3 [1.9]
When you run your code step by step to find defects. This technic is…
A. Reviewing
B. Testing
C. Debugging
6 D. Refactoring C CLO.4 K
4 [1.9]
What is the reason of code defects?
A. Poor understanding of requirements
B. Poor design
C. Poor coding practices
7 D. All above. D CLO.4 K
4 [1.9]
If a defect must be fixed quickly. What will you do?
A. Let junior programmers fix defects
B. Consider assigning 2 or 3 developers to it
C. Change code randomly and hope it fixes things
8 D. All above B CLO.4 K
A hardware device used to debug the software of an embedded 4 [1.9]
system is...
A. Internal trace log
B. Design review
C. An in-circuit emulator (ICE)
9 D. Interactive Debugger C CLO.4 K
From studies, how many percents of defects are found in 5% of 3 [1.9]
classes?
A. 30
B. 40
C. 50
10 D. 60 C CLO.4 K

1.6. Analyzing and Fixing Defects


Index Question Result CLO SO Level Ref

When you test the number of users access the website at the same
time, that is…
A. Accepting Test
B. Unit Test
C. Integration Test
1 D. Stress Test D CLO.3 K 5 [1.12]
The goal of testing is…
A. To find all defects
B. To admit the software is good enough to release
C. To remove defects
2 D. To find as many defects as they can D CLO.3 K 2 [1.12]
When will you evolve and expand your test suite over time?
A. Whenever a defect is found
B. When adding new features
C. When you look at someone else's code and see a testing hole
3 D. All above D CLO.3 K 4 [1.12]
What is Integration Testing?
A. is a method by which individual units of source code are tested to
determine if they are fit for use
B. is the phase in software testing in which individual software modules
are combined and tested as a group
C. is testing conducted on a complete, integrated system to evaluate the
system's compliance with its specified requirements
D. is a test conducted to determine if the requirements of a
4 specification or contract are met B CLO.3 K 8 [4]

If you want to know how Module1 work together with Module2. What
case of the test will you do?
A. Unit Test
B. System Test
C. Integration Test
5 D. Acceptance Test C CLO.3 K 4 [1.12]

When you test the number of users access the website at the same
time, that is…
A. Accepting Test
B. Unit Test
C. Integration Test
6 D. Stress Test CLO.3 K 2 [1.12]

What is the normal order of activities software testing?


1. Integration testing
2. Unit testing
3. System testing
4. Acceptance testing

A. 1, 2, 3, 4
B. 4, 3, 2, 1
C. 2, 1, 3, 4
7 D. 4, 1, 3, 2 C CLO.3 K 9 [1.12]
Which type of project bellow needs more and more testing
A. Medical systems
B. Airplane guidance systems
C. Weapons systems
8 D. All above D CLO.3 K 3 [1.12]
In Agile processes, what phase can customers participate?
A. Unit Test
B. Integration Test
C. Acceptance Test
9 D. System Test C CLO.3 K 4 [1.12]
Which library supports unit test in Eclipse?
A. junit.framework.TestCase
B. java.junit.Test
C. java.junit
10 D. All above A CLO.3 K 7 [1.12]

1.7. Refactoring
Index Question Result CLO SO Level Ref
Which statement is WRONG when you are talking about refactoring?
A. Refactoring does NOT fix defects
B. Refactoring does NOT add new functionality
C. Refactoring does NOT make the codes better
1 D. Refactoring is the technology to improve the code C CLO.3 K 5 [1.10]

What is a code smell?


A. Code smell is any symptom in the source code of a program that
possibly indicates a deeper problem
B. Code smell is a finding defect technical, that used to find where codes
need to refactor
C. Code smell is a refactoring tool
2 D. A, B, C are correct B CLO.3 K 4 [1.10]
Long method (code smell) is…
A. an application has more than 200 class, interfaces or forms
B. a class having too much method
C. a method indicates too many parameters
3 D. a method, function, or procedure that has grown too large D CLO.3 K 4 [1.10]

Duplicated code (code smell) is…


A. Duplicated code problem is identical or very similar code exists in
more than one location
B. Duplicated code problem is when you have the same expression in
two methods of the same class
C. Duplication problem is when you have the same expression in two
sibling subclasses
4 D. A, B, C are correct A CLO.3 K 6 [1.10]
When must you refactor your codes?
A. The codes are so bad
B. The codes have some defects
C. The codes have not defected but you want to improve its
5 D. All Above C CLO.3 K 3 [1.10]

How to refactor this code?


double circlesquare= radius*radius*3.14;
A. The circlesquare variable must be rename to circleSquare
B. The radius variable must be renamed to Radius
C. 3.14 much be naming such as const double PI= 3.14
6 D. A and C are correct D CLO.3 K 8 [1.10]
What are the goals of Refactoring technology?
A. Improve the understandability of the code
B. Improve the structure of the code
C. Remove unnecessary code
7 D. All Above D CLO.3 K 2 [1.10]
What is the reason for NOT to refactor codes?
A. Have no comment
B. The code right but not follow to standard
C. The code too bad
8 D. All Above B CLO.3 K 4 [1.10]

When you want to move some lines of codes to a new procedure.


What will you do in Eclipse?
A. Copy, Paste and Modify the code
B. Use the Extract method in Refactoring
C. Use the Pull Up in Refactoring
9 D. Use the Push Down in Refactoring B CLO.3 K 7 [1.10]

For moving a method from subclass to supper class in eclipse. What


refactoring technic will you do?
A. Copy, Paste and Modify the code
B. Use the Extract method in Refactoring
C. Use the Pull Up in Refactoring
10 D. Use the Push Down in Refactoring C CLO.3 K 8 [1.10]

1.8. Analyzing & Estimating Requirements


Index Question Result CLO SO Level Ref
Traditional methodology work on prioritized change requests from
A. change requests
B. Customer said
C. Leader said
1 D. Change Control Board D CLO.3 K 4 [1.11]
If you get a new change from the customer. What document must you
fill?
A. Change Requests
B. Software Requirement Specification
C. Change Control Board
2 D. All above A CLO.3 K 3 [1.11]

When a project needs to change from the customer. What do you


want to talk about?
A. Schedule
B. Money
C. Risk
3 D. Ranges D CLO.3 K 3 [1.11]
Which statement is right when you talk about the rapport with the
customer?
A. Phone to the customer when you have free time
B. Email for them every day
C. Different types depending on needs and preferences
4 D. A, B, C are correct C CLO.3 K 6 [1.11]
What do you want customers to know?
A. Software life cycle
B. Software life cycle and what they can support
C. The project's profits
5 D. All above B CLO.3 K 4 [1.11]
In software change management CCB is the observation for…
A. Changing Control Board
B. Configuration Changing Board
C. Configuration Control Board
6 C. All above A CLO.3 K 2 [1.11]
Which statement is right for requirement change?
A. Traditional methodologies are more flexible than Agile's
B. Agile methodologies are more flexible than traditional's
C. Agile methodologies are the same flexibility as traditional's
7 D. A, B, and C are not correct B CLO.3 K 7 [1.11]
With unclearly requirement software, what used methodology is
right?
A. Traditional
B. Agile
C. Depend on what process we know
8 D. None of the above B CLO.3 K 4 [1.11]
What methodology in which requirement change is embraced?
A. Traditional
B. Agile
C. A and B are correct
9 D. None of the above B CLO.3 K 3 [1.11]

Which statement is WRONG for the roles of customers in change


management?
A. Customers will not (or can’t) participate in reviews
B. Customers don’t understand the software development process
C. Customers won’t let people do their jobs
10 D. Customers always commit to a set of written requirements D CLO.3 K 7 [1.11]

1.9. Customer Satisfaction


Index Question Result CLO SO Level Ref
According to Kano, what is an Exciter?
A. Features that we can describe as "the more of the better"
B. The final category is for features that are mandatory
C. Feature that a user doesn’t know he wants until he sees it
1 D. All Above C CLO.3 K 3 [1.13]
Kano’s Survey questions based on…
A. The functional form of questions
B. A dysfunctional form of questions
C. Nonfunctional
2 D. Both A and B are correct D CLO.3 K 4 [1.13]
According to Kano, who are your customers?
A. User Community
B. Your Executive Management
C. The Project Team
3 D. All Above D CLO.3 K 2 [1.13]
The Kano model is used for…
A. Increasing the quality of codes
B. Finding defects as much as possible
C. Assessing customer satisfaction
4 D. Testing the security of the application C CLO.3 K 3 [1.13]
In Kano technique, "the more of the better" is defined by?
A. Exciters
B. Linear
C. Baseline
5 D. A and C are correct B CLO.3 K 4 [1.13]

2. Phần tự luận
2.1. Testing and Quality
Index Question Solution Example CLO SO Level Ref
1 Write a unit test for that code 1. Test Return value import static CLO.3 K 6 [1.12]
public class Calculator { 2. Test larger max int org.junit.Assert.assertEquals;
public int add(int number1, int type import org.junit.Test;
number2) 3. Test smaller than public class CalculatorTest {
{ min int type Calculator cal = new Calculator();
return number1 + number2; @Test
} public void testAdd1()
} {
assertEquals(3, cal.add(2, 1));
}

@Test
public void testAdd2()
{
assertTrue(cal.add(2000000000,
2000000000) > 2000000000);
}

@Test
public void testAdd3()
{
assertTrue(cal.add(-2000000000, -
2000000000) < -2000000000);
}
}
2 Write a unit test for that code public class CalculatorTest { CLO.3 K 6 [1.12]
public class Calculator { Calculator cal = new Calculator();
public int sub(int number1, int @Test
number2) public void testSub1()
{ {
return number1 - number2; assertEquals(1, cal.sub(2, 1));
} }
}
@Test
public void testSub2()
{
assertTrue(cal.sub(2000000000, -
2000000000) > 2000000000);
}

@Test
public void testSub3()
{
assertTrue(cal.sub(-2000000000,
2000000000) < -2000000000);
}
}
3 Write a unit test for that code 1. Test Return value import static CLO.3 K 7 [1.12]
public class Calculator { 2. Test larger max int org.junit.Assert.assertEquals;
public int mul(int number1, int type import org.junit.Test;
number2) 3. Test smaller than public class CalculatorTest {
{ min int type Calculator cal = new Calculator();
return number1 * number2;
} @Test
} public void testMul1()
{
assertEquals(2, cal.mul(2, 1));
}

@Test
public void testMul2()
{
assertTrue(cal.mul(2000000000, 2)
> 2000000000);
}

@Test
public void testMul3()
{
assertTrue(cal.mul(-2000000000,
2) < -2000000000);
}
}
4 Write a unit test for that code 1. Test Return value import static CLO.3 K 8 [1.12]
public class Calculator { 2. division 0 org.junit.Assert.assertEquals;
public int div(int number1, int import org.junit.Test;
number2) public class CalculatorTest {
{ Calculator cal = new Calculator();
return number1 / number2;
} @Test
} public void testDiv1()
{
assertEquals(2, cal.div(2, 1));
}

@Test
public void testDiv2()
{
cal.div(2, 0);
fails();
}
}
5 Write a unit test for that code 1. Test Many roots public class SolveEquationTest { CLO.3 K 4 [1.12]
public class SolveEquation { 2. Test No root SolveEquation equ = new
public String linearEquation(int 3. Test One root SolveEquation();
number1, int number2)
{ @Test
if(number1==0) public void testLinearEquation1() {
if(number2 == 0) assertEquals("Multi roots",
return "Multi roots"; equ.linearEquation(0, 0));
else }
return "No root";
else @Test
return "One root"; public void testLinearEquation2() {
} assertEquals("No root",
} equ.linearEquation(0, 1));
}

@Test
public void testLinearEquation3() {
assertEquals("One root",
equ.linearEquation(1, 1));
}
}
6 Write a unit test for that code Test first number is import static CLO.3 K 4 [1.12]
public class MaxNumber { max org.junit.Assert.assertEquals;
public int max3(int number1, int Test second number import org.junit.Test;
number2, int number3) { is max public class MaxNumberTest {
if (number1 > number2) Test third number is MaxNumber m = new
if (number1 > number3) max MaxNumber();
return number1; @Test
else public void testMax31() {
return number3; assertEquals(8, m.max3(8, 0 ,4));
else if (number2 > number3) }
return number2;
else @Test
return number3; public void testMax32() {
} assertEquals(7, m.max3(4, 7 ,4));
} }

@Test
public void testMax33() {
assertEquals(9, m.max3(3, 0 ,9));
}
}
7 Write a unit test for that code Test first number is public class MaxNumberTest { CLO.3 K 2 [1.12]
public class MaxNumber { max MaxNumber m = new
public int max2(int number1, int Test second number MaxNumber();
number2) { is max @Test
if (number1 > number2) public void testMax21() {
return number1; assertEquals(8, m.max3(8, 0));
else }
return number2;
} @Test
} public void testMax22() {
assertEquals(7, m.max3(4, 7));
}
}
8 Write a unit test for that codes Test number1 is import static CLO.3 K 6 [1.12]
public class Sort { greater than number org.junit.Assert.assertEquals;
int number1; 2 import org.junit.Test;
int number2; Test number1 is less public class SortTest {
public void sortAsc() than number 2 @Test
{ public void testSortAsc1() {
if(number1> number2) Sort s = new Sort();
{ s.number1= 5;
int temp = number1; s.number2= 3;
number1 = number2; s.sortAsc();
number2 = temp; assertEquals(3, s.number1);
} assertEquals(5, s.number2);
} }
@Test
} public void testSortAsc2() {
Sort s = new Sort();
s.number1= 3;
s.number2= 5;
s.sortAsc();
assertEquals(3, s.number1);
assertEquals(5, s.number2);
}
}
9 Write a unit test for that codes Test number1 is import static CLO.3 K 6 [1.12]
public class Sort { greater than number org.junit.Assert.assertEquals;
int number1; 2 import org.junit.Test;
int number2; Test number1 is less public class SortTest {
public void sortDesc() than number 2 @Test
{ public void testSortDesc1() {
if(number1< number2) Sort s = new Sort();
{ s.number1= 5;
int temp = number1; s.number2= 3;
number1 = number2; s.sortDesc();
number2 = temp; assertEquals(5, s.number1);
} assertEquals(3, s.number2);
} }
@Test
} public void testSortDesc2() {
Sort s = new Sort();
s.number1= 3;
s.number2= 5;
s.sortDesc();
assertEquals(5, s.number1);
assertEquals(3, s.number2);
}
}
10 Write a unit test for that codes Test first number is import static CLO.3 K 5 [1.12]
public class Triangle { max org.junit.Assert.assertEquals;
int number1; Test second number import org.junit.Test;
int number2; is max public class TriangleTest {
int number3; Test third number is Triangle m = new Triangle();
public int maxLength() max @Test
{ public void testMmaxLength1() {
if(number1 >= number2) assertEquals(8, m.max3(8, 0 ,4));
if(number1 > number3) }
return number1;
else return number3; @Test
if(number2 > number3) public void testMmaxLength2() {
return number2; assertEquals(7, m.max3(4, 7 ,4));
else return number3; }
}
} @Test
public void testMmaxLength3() {
assertEquals(9, m.max3(3, 0 ,9));
}
}

2.2. Refactoring
Index Question Solution Example CLO SO Ref
1 Refactoring that codes 1. Naming: r, Area, //Create date: 3/5/18 CLO.3 K 3 [4]
public class circle { Perimeter //Create by: SanhTK
double r; 2. set a constant public class R_Circle {
variable for 3.14 private static final double PI =
public double Area() { value 3.14;
return r * r * 3.14; 3. Comment for class double radius;
}
public double area() {
public double Primeter() { return radius * radius * PI;
return 2 * 3.14 * r; }
}
} public double primeter() {
return 2 * 3.14 * radius;
}
}

2 Refactoring that codes 1. Naming: print //Create date: 3/5/18 CLO.3 K 4 [4]
public class print { 2. duplicte code //Create by: SanhTK
public void printStart() { printStart and public class Print {
printEnd public void printAll(String
System.out.println("************* 3. Comment for class content) {
****");
System.out.println("***********
System.out.println("******START** ******");
****");
System.out.println("************* System.out.println("******"+cont
****"); ent+"******");
}
public void printEnd() { System.out.println("***********
******");
System.out.println("************* }
****"); }

System.out.println("*******END**
*****");
System.out.println("*************
****");
}

3 refactor paintResult becomes the 1. Naming: paint public class Paint { CLO.3 K 9 [4]
method with 2 parameters 2. many parameters //print the result in location(x,y)
public class paint { 3. Comment for class and the color(red blue,green)
//print the result in location(x,y) public void paintResult(Location
with the color(red blue,green) point
public void paintResult(int x, int y , Color color){
, byte red, byte blue, byte green){ //do not need to rewrite this
//do not need to rewrite this code code
} }
} }
class Location{
int x;
int y;
}

class Color{
byte red;
byte blue;
byte green;
}
4 Refactoring that codes 1. Naming: //Create date: 3/5/18 CLO.3 K 6 [4]
public class maxNumber { maxNumber //Create by: SanhTK
public int max2(int a, int b) { 2. duplicate code public class MaxNumber {
if (a >= b) max2 and max3 public int max2(int number1, int
return a; 3. Comment for class number2) {
else if (number1 >= number2)
return b; return number1;
} else
public int max3(int a, int b, int c) { return number2;
if (a >= b) }
if (a >= c)
return a; public int max3(int number1, int
else number2, int number3) {
return c; return max2(max2(number1,
else if (b >= c) number2),number3);
return b; }
else }
return c;
}
}
5 Remove duplicate codes 1. comment //Create date: 3/5/18 CLO.3 2 [4]
class Employee 2. move method to //Create by: SanhTK
{ parent class Employee
public string Name { get; set; } {
public string ID { get; set; } public string Name { get; set; }
} public string ID { get; set; }
public void DoWork() { ... }
class Coder extends Employee }
{
public void DoWork() { ... } class Coder extends Employee
} {
}
class Manager extends Employee
{ class Manager extends Employee
public void DoWork() { ... } {
} }
6 Refactoring that codes 1. Naming: q, b, c //Create date: 3/5/18 CLO.3 K 7 [4]
public class Sort { 2. duplicate code //Create by: SanhTK
int a; 3. Comment for class public class Sort {
int b; int number1;
int c; int number2;
public void ascSort(){ int number3;
if(a>b) public void ascSort(){
{ compare2Number(number1,
int temp =a; number1 =number2);
a = b; compare2Number(number1,
b = temp; number1=number3);
} compare2Number(number2,
if(a>c) number2=number3);
{ }
int temp =a; private void compare2Number(int
a = c; n1, int n2) {
c = temp; if(n1>n2)
} {
if(b>c) int temp =n1;
{ n1 = n2;
int temp =b; n2 = temp;
b = c; }
c = temp; }
} }
}
}
7 Refactoring that codes 1. Naming: a, b, c //Create date: 3/5/18 CLO.3 K 7 [4]
public class Sort { 2. duplicate code //Create by: SanhTK
int a; 3. Comment for class public class Sort {
int b; int number1;
int c; int number2;
public void descSort(){ int number3;
if(a<b) public void descSort(){
{ compare2Number(number1,
int temp =a; numbber1=number2);
a = b; compare2Number(number1,
b = temp; number1=number3);
} compare2Number(number2,
if(a<c) number2=number3);
{ }
int temp =a; private void compare2Number(int
a = c; n1, int n2) {
c = temp; if(n1<n2)
} {
if(b<c) int temp =n1;
{ n1 = n2;
int temp =b; n2 = temp;
b = c; }
c = temp; }
} }
}
}
8 Refactoring that codes 1. Naming: Bonus, //Create date: 3/5/18 CLO.3 K 4 [4]
public class Employee { Name //Create by: SanhTK
String Name; 2. set constant public class Employee {
double Bonus; variable for 1400000 private static final int basicRate =
double payRate; value 1400000;
3. Comment for class String name;
public double basicSalary(){ double bonus;
return payRate*1400000; double payRate;
}
public double salary(){ public double basicSalary(){
return Bonus + basicSalary(); return payRate*basicRate;
} }
} public double salary(){
return bonus + basicSalary();
}
}
9 Refactoring that codes 1. Naming: //Create date: 3/5/18 CLO.3 K 3 [4]
public class Equation { LinearEquation, //Create by: SanhTK
public String LinearEquation(int a, QuadraticEquation public class Equation {
int b){ 2. duplicate code public String linearEquation(int a,
if(a==0) 3. Comment for class int b){
if(b==0) return "any number"; if(a==0)
else return "no number"; if(b==0) return "any number";
else return "one number"; else return "no number";
} else return "one number";
}
public String QuadraticEquation(int
a, int b, int c){ public String
if(a==0){ quadraticEquation(int a, int b, int
if(b==0) c){
if(c==0)return "any number"; if(a==0){
else return "no number"; linearEquation(b, c);
else return "one number"; }else{
}else{ int delta = b*b - 4*a*c;
int delta = b*b - 4*a*c; if(delta < 0) return "no number";
if(delta < 0) return "no number"; else if(delta == 0) return "one
else if(delta == 0) return "one number";
number"; else return "two numbers";
else return "two numbers"; }
} }
}
10 Refactoring that codes 1. remove method class StudentInfo{ CLO.3 K 6 [4]
public class Student { has many parameters int id;
2. Comment for class String name;
public void display(int id, String int classID;
name, int classID, String birthday, String birthday;
String address, String phone) String address;
{ String phone;
System.out.println(id + ", " + name + }
", "+ classID + ", " + birthday + ", "+
address + ", " + phone); //Create date: 3/5/18
} //Create by: SanhTK
}
public class Student {

public void display(StudentInfo s)


{
System.out.println(s.id + ", " +
s.name + ", " + s.classID + ", " +
s.birthday
+ ", " + s.address + ", " +
s.phone);
}
}

You might also like