Basic Computer Conceptscc.ee.ntu.edu.tw/~farn/courses/BCC/NTUEE/2016.spring/Syllabus.pdf ·...
Transcript of Basic Computer Conceptscc.ee.ntu.edu.tw/~farn/courses/BCC/NTUEE/2016.spring/Syllabus.pdf ·...
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 2016
13:20-14:10, Tuesday
15:30-17:20, Wednesday
Room: 電二102
Textbook: J. Glenn Brookshear
Computer Science – An Overview
12th Edition, Addison-Wesley.
台灣代理:新月圖書公司
台北市重慶南路一段143號3樓
02-2331-1578
http://www.bookcake.com.tw
Instructor
• Instructor: 王凡教授
• 博理館 616
• 03-33663602
• webpage
http://cc.ee.ntu.edu.tw/~farn
6
Teaching assistant
柳皓瑋
office hour: Tuesday 6:30pm-7:30pm
7
Evaluation
• Midterm exam 30%
80% will be variations of the homework in the textbook.
• Final exam: 33%
80% will be variations of the homework in the textbook.
• Term project: 25%
• 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 Projectteam
• 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 Projectteam, 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/9)
Submission to the TA via email the follwingteam 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/22)
• 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/22), 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/22), 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/22), 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/22), 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/22), 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/22), 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/22), 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/22), 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 (5/11)
• 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 (5/11)
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 (5/11)
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 (5/11)
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/14)
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/14)
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/14)
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
Course schedule (I/V)
(1) 2/23 syllabus presentation
(2) 2/24 Chapter 0
(3) 3/1 Chapter 1
(4) 3/2 Chapter 1
(5) 3/8 Chapter 2
(6) 3/9 Chapter 2,
Term project team registration
(7) 3/15 Chapter 331
Course schedule (II/V)
(8) 3/16 Chapter 3
(9) 3/22 Chapter 4, Term Project, proposals
(10) 3/23 Chapter 4
(11) 3/29 Chapter 4
(12) 3/30 Chapter 5
(13) 4/6 Chapter 5
(14) 4/12 Chapter 6
(15) 4/13 Chapter 632
Course schedule (III/V)
(16) 4/19 Mid-Term Exam
(17) 4/20 Chapter 6
(18) 4/26 Chapter 7
(19) 4/27 Chapter 7,
(20) 5/3 Chapter 7,
(21) 5/4 Chapter 8,
(22) 5/10 Chapter 8,
33
Course schedule (IV/V)
(23) 5/11 Chapter 8
Mid-term project report.
(24) 5/17 Chapter 9
(25) 5/18 Chapter 9
(26) 5/24 Chapter 10
(27) 5/25 Chapter 10
(28) 5/31 Chapter 11
(29) 6/1 Chapter 11
34
Course schedule (V/V)
(30) 6/7 Chapter 12
(31) 6/8 Chapter 12
(32) 6/14 Final project presentation
(33) 6/15 Final exam
35