Basic Computer Conceptscc.ee.ntu.edu.tw/~farn/courses/BCC/NTUEE/2014.spring/Syllabus.pdf · System...
Transcript of Basic Computer Conceptscc.ee.ntu.edu.tw/~farn/courses/BCC/NTUEE/2014.spring/Syllabus.pdf · System...
Basic Computer Concepts
王凡
Dept. of Electrical Engineering
National Taiwan University
1
901 10110
Purpose
An introductory survey to computer science
• exploring the breadth
• exposing enough depth
2
Audience
• EE, CS majors – beyond programming, web-browsing, internet
file-sharing • IC, computer architectures, operating systems,
programming languages, algorithms, network, security, software engineering, database, …
– for appreciation of future courses
• students from other disciplines – to live in a technology society
– with a practical and realistic understanding of the entire field
3
Prerequisites
• None!
4
Course information 901 10110
Time: Spring 2014
13:20-14:10, Tuesday & 15:30-17:20, Wednesday
Room: 電二102
Textbook: J. Glenn Brookshear
Computer Science – An Overview
10th Edition, Addison-Wesley.
台灣代理:新月圖書公司
台北市重慶南路一段143號3樓
02-2331-1578
http://www.bookcake.com.tw
5
Instructor
• Instructor: 王凡 教授
• 博理館 616
• 03-33663602
• webpage
http://cc.ee.ntu.edu.tw/~farn
6
Teaching assistant
周維中
office hour: Tuesday 6:30pm-7:30pm
BL 112
7
Evaluation
• Midterm exam 34%
80% will be variations of the homework in the textbook.
• Final exam: 34%
80% will be variations of the homework in the textbook.
• Term project: 20%
• Homework: 12%
8
非目的
• 本門課程不以當學生為目的!
–六十分不能證明什麼,只能傷害你往後的申請案。
• 可是,
–作業缺交多次
–期中考、期末考成績慘不忍睹
–學期計畫敷衍了事
必當!!!
9
Do whatever you like! • Please identify a topic that you like to do.
• Explain why it is worth doing.
• Describe the design.
• Describe how you plan to test it.
• Implement it.
Term Project
10
Term Project team
• 2 students a team
– a programmer and a tester
• They define the specification together.
• Then they work in parallel respectively for the program and testplan implementation.
• Note that changes to the specification in later stages of the project will cause pains of the team members. Thus such changes should be avoided.
11
Term Project team, continued
• programmer-specific job
– design the program according to the spec.
– implement the program according to the design.
• tester-specific job
– design the test plan according to the spec.
– implement the test plan according to the test design.
– The tester is not responsible for testing any property different from the spec.
12
Term project checkpoint 1, team registration (3/5)
Submission to the TA via email the follwing team member information:
• Name of the programmer,
• Name of the tester, and
• Student ID numbers of the two members
Example:
Spidermen:
李大偉([email protected]):programmer、
張小俠([email protected]): tester。
13
Term project checkpoint 2, proposal (3/19)
• 5 mins presentation for each team.
• Submit to the TA via email:
– the powerpoint document and
– design framework, including
• sequence diagrams,
• use cases,
• Explain why it is worth doing.
14
Term project checkpoint 2, proposal (3/19), continued
• Specify your program
– explain why it is reasonable.
– Note that once the specification is fixed, it is not supposed to change. Spec. change will create the difficulties for the tester in constructing test plans.
• For the programmer, describe your design
– Use cases, sequence diagram, control flow
• For the tester, describe your test plan.
– explain why it is sufficient.
15
Term project checkpoint 2, proposal (3/19), continued
Why?
• Educational!
• Easy to use!
• Flexible!
16
1, 3, -1, -2
-2, -1, 1, 3
submit clear
Example: Sorter, a web-based sorting tool.
Term project checkpoint 2, proposal (3/19), continued
Design requirement (spec.):
• Any lengths of integers
• Clear any time
• Submit any time
• Error message.
17
1, 3, -1, -2
-2, -1, 1, 3
submit clear
1, 3, a, -2
Illegal element
submit clear
Example: Sorter, a web-based sorting tool.
Term project checkpoint 2, proposal (3/19), continued
Design requirement (spec.):
• Use cases:
– submit a legitimate sequence
– Submit an error sequence
– Clear sequence input
– Submit after modification
– Immediate clear after an op.
– Immediate submit after an op.
18
1, 3, -1, -2
-2, -1, 1, 3
submit clear
1, 3, a, -2
Illegal element
submit clear
Example: Sorter, a web-based sorting tool.
Term project checkpoint 2, proposal (3/19), continued
Design requirement (spec.):
• Use cases: submit a legitimate sequence
19
Example: Sorter, a web-based sorting tool.
user Sorter
Open browser
Browser shown
Enter sorter link
Sorter page shown
Enter a legitimate sequence
Correct sorting!
Submit
Term project checkpoint 2, proposal (3/19), continued
Design requirement (spec.):
• Use cases: clear sequence input
20
Example: Sorter, a web-based sorting tool.
user Sorter
Open browser
Browser shown
Enter sorter link
Sorter page shown
Enter a sequence
All fields cleared!
Clear
Term project checkpoint 2, proposal (3/19), continued
Design requirement (spec.):
• Control flow
21
Example: Sorter, a web-based sorting tool.
start
Open browser
Input sequence
Enter sorter link
Sorting result
submit clear
Error message
Term project checkpoint 2, proposal (3/19), continued
Test requirement: Input space partitioning (ISP)
• Test lengths 0, 1, 2, 3, [4,10], [11,99], [100,)
• Single submit, single clear, double submit, double clear, submit after page popping up, clear after page popping up, …
• Empty elements, empty list, non-numerics, large numbers, …
• Every sequence diagram
• Every path of length < 4 in the control flow graph
22
Example: Sorter, a web-based sorting tool.
Term project Checkpoint 3, midterm presentation (4/30)
• 8 mins presentation for each student.
• Submit to the TA via email:
– the powerpoint document and the programs
• Programmer:
– classes, methods, …, preliminary runs
– Explain why the architecture fulfills the function.
• Tester:
– Test metrics, test set, test implementation, preliminary tests
• Explain changes to the specification. 23
Term project Checkpoint 3, midterm presentation (4/30)
Design by the programmer
24
Example: Sorter, a web-based sorting tool.
Web gui (html)
Data manipulation (Java)
Client- or server-side
• format_check(sequence) • sort(sequence) • Other applet methods ? • Other applet attributes ?
Ajax
Term project Checkpoint 3, midterm presentation (4/30)
Unit testing on the data manipulation by tester
• format_check(sequence), test completeness indicator
– All intervals of the ISP must be tested 3 times
– All sequence diagrams must be tested 3 times
– All path segments of 3 nodes in the control flow graph must be tested.
• Sort(sequence), test completeness indicator
– The same …
25
Example: Sorter, a web-based sorting tool.
Term project Checkpoint 3, midterm presentation (4/30)
Unit testing on the data manipulation by tester
• Prepare test data to satisfy the test criteria
• May use JUnit to
– Create a method for each test case.
– Create a main procedure to execute all the test cases.
• Bug reprots: Show how many bugs are revealed ?
26
Example: Sorter, a web-based sorting tool.
Term project Checkpoint 4, final presentation (6/11)
continued,
• For the programmer, describe your implementation.
– classes, methods,
– How it fulfills the requirements
– Please do not ask the audience to trace your code in the presentation!
• For the tester, show how you validate your implementation through testing.
– instrumentation, bug reports, coverage, … 27
Term project Checkpoint 4, final presentation (6/11)
Project demonstration
• Show the implementation
• Show how the requirements are taken care in the implementation.
• Show how the issues in handling the requirements.
• Show example runs. 28
1, 3, -1, -2
-2, -1, 1, 3
submit clear
1, 3, a, -2
Illegal element
submit clear
Example: Sorter, a web-based sorting tool.
Term project Checkpoint 4, final presentation (6/11)
System testing by the tester
• Use Selenium
• Record the testing sequence
• Show how the testing sequences correspond to the test requirements.
• Show how the test cases fulfill the test completeness indicator.
29
Example: Sorter, a web-based sorting tool.
Term Project
• The two students in a team will be graded independently.
– for design: class diagrams, sequence diagrams, use cases, and state charts;
– for testing: unit test plan
– If the program is not finished but the test plan is good, the tester can still get good score.
30
Alternative course schedule (I/III)
• 2/18 syllabus presentation
• 2/19 Chapter 0
• 2/25,26 Chapter 1
• 3/4 Chapter 2
• 3/5 Chapter 2,
Term project team registration
• 3/11,12 Chapter 3
• 3/18 Chapter 4, 31
Alternative course schedule (II/III)
• 3/19 Chapter 4
Term Project, proposals
• 3/25 Chapter 4
• 3/26;4/1,8 Chapter 5
• 4/9 ,15 Chapter 6
• 4/16 Mid-Term Exam
• 4/22 Chapter 6
• 4/23,29 Chapter 7, 32
Alternative course schedule (III/III)
• 4/30 Chapter 7,
Mid-term project report.
• 5/6,7 Chapter 8
• 5/13,14 Chapter 9
• 5/20,21 Chapter 10
• 5/27,28 Chapter 11
• 6/3,4,10 Chapter 12
• 6/11 Final project presentation
• 6/18 Final exam 33