Mark Dixon, SoCCE SOFT 131Page 1 SOFT – Module Introduction & Overview
Mark Dixon, SoCCE SOFT 131Page 2 About Me Contact Details Mark Dixon Portland Square Room B316 Availability Monday, Tuesday, Wednesday – School of Computing Communications and Electronics (main campus) Thursday, Friday – Peninsula Medical School (Derriford Hospital)
Mark Dixon, SoCCE SOFT 131Page 3 Module Aims This module aims to teach you: –How to learn (self-directed) surface learning (memorisation of isolated facts) deep learning (interrelated concepts) –How to develop software: fundamental programming concepts (e.g. events, procedures) how to combine these to solve problems –How to use Visual BASIC
Mark Dixon, SoCCE SOFT 131Page 4 Module Admin Lectures and tutorials: –start at 5 minutes past the hour, and –aim to end at 5 minutes to the hour –if no lecturer - wait until 15 minutes past the hour then you may leave –Turn mobile phones off. –Ask questions or comment at any time –Feel free to talk quietly amongst yourselves –Material (slides, handouts, etc.) available 1 hour before session, on: Soft131 web-site (mdixon.soc.plymouth.ac.uk) Lectures: –Don’t come in after 15 minutes past the hour.
Mark Dixon, SoCCE SOFT 131Page 5 Module Format The module is delivered as follows: Lecture: 1 hr per week, all groups, Mondays 13:05 – 13:55 Tutorials / Practical Session: 2 hr per week Mondays 14:05 – 15:55 Tuesdays 14:05 – 15:55 Tuesdays 09:05 – 10:55 Private study (as much as it takes – typically 3 hours/week) Teaching Evaluation (timely and specific) –Student Perception Questionnaire –Continuous Informal Feedback (talk to me)
Mark Dixon, SoCCE SOFT 131Page 6 Schedule (Term 1) WeekStartTitleTopics and ConceptsAssignment No.Date 127-SepModule introduction & overview Specifications, Objects, Controls, Properties, Methods, Events, Event handlers, Procedures, Instructions, Assignment, deep vs. surface learning 204-OctUser Interface Design Usefulness, usability, learnability, user interface design principles, incremental development, functional decomposition, verification, validation 311-OctGraphicsGrid system, graphics controls and methods (pset, line, circle). 418-OctData, Data-types, and VariablesTypes of data, data types, variable declaration & assignment 525-OctConditional execution (selection)Conditional statements (if and case statements), decision trees 601-NovIteration (repetition) Manual and automatic iteration using loops (for and while statements) 708-NovConstants, Arrays, & StructuresConstants, arrays, structures/records/user defined data types 815-NovProceduresAbstraction, procedures. 922-NovArguments/ParametersArguments/parameters, calling by value and by referenceOut 1029-NovFunctions 1106-DecArrays of Structures & ModulesArrays of Structures, Modules/units 1213-DecPassing Parameters by ReferenceMemory addresses, pass by value, pass by reference.In Fri 17 Dec
Mark Dixon, SoCCE SOFT 131Page 7 Reading List 1 The following book is recommended reading: –McKeown, P; and Piercy, C (2001) Learning to program with Visual BASIC. 2nd Edition. John Wiley & Sons. ISBN
Mark Dixon, SoCCE SOFT 131Page 8 Reading List 2 Additional reading (the following are referred to occasionally, borrow from library): Pressman, R (2000) Software Engineering: a practitioner's approach. 5th edition. McGraw-Hill. ISBN: Sommerville, I (2001) Software Engineering. 6th edition. Addison-Wesley. ISBN: X. –Overview of Software Engineering: Chapter 1, especially page 4. Preece, J; Rogers, Y; Sharp, H; Benyon, D; Holland, S; and Carey, T (1994) Human-Computer Interaction. Addison Wesley. ISBN: –Direct Manipulation: Section 13.6, pages –Interface Design: Chapter 24, pages Shneiderman, Ben (1998) Designing the user interface: strategies for effective human-computer interaction. 3rd edition. Addison-Wesley. ISBN SHN
Mark Dixon, SoCCE SOFT 131Page 9 Student Background Typically wide range of prior experience A.10 years programming (professional?) B.5 years programming (professional?) C.3 years programming (professional?) D.1 year programming (learning) E.no programming Can be difficult to cater for all A B C D E number of students
Mark Dixon, SoCCE SOFT 131Page 10 Attendance Attendance is mandatory This is not a distance learning course portal is supplement (not replacement) for attending lectures and tutorials
Mark Dixon, SoCCE SOFT 131Page 11 What is Programming? Essentially: teaching computers User Requirements (Natural Language: English) User Software Developer Computer Instructions (computer programming language: Visual BASIC) (You)
Mark Dixon, SoCCE SOFT 131Page 12 Software Engineering Response to failure of software: –late –over budget –does not work Specifications –describe what software should do acts as ‘to do’ list for developer acts as contract between developer and user Functional decomposition –break down problem into smaller chunks Incremental Development –do a bit at a time
Mark Dixon, SoCCE SOFT 131Page 13 Example 1: Hello
Mark Dixon, SoCCE SOFT 131Page 14 Event-driven programming Form1 Label1 Command1 Click Double Click Key Press Event WindowsProgramming FormControl Objects Sub Command1_Click End Sub Label1.Caption = “Hello” Event Handler Procedure Instruction Identifier Property Literal
Mark Dixon, SoCCE SOFT 131Page 15 VB Environment Toolbox Properties Window Form Window Project Explorer
Mark Dixon, SoCCE SOFT 131Page 16 Controls - ToolBox Design screens (forms) using controls from the Toolbox: –Picture box: display diagrams & images –Label: display text that user cannot change –Textbox: allow user to enter text –Command button: allow user to initiate actions
Mark Dixon, SoCCE SOFT 131Page 17 Properties Label –Name: used to identify control (not visible to user) –Caption: the text displayed on the label –BackColor: the label's background colour Command Button –Name: used to identify control (not visible to user) –Caption: the text displayed on the button Text Box –Name: used to identify control (not visible to user) –Text: the text typed in by the user
Mark Dixon, SoCCE SOFT 131Page 18 Software Development Cycle Software development follows this pattern: –analyse problem –design solution –implement (code) solution –test & debug solution (code) However, it is: –cyclic/iterative (not linear)
Mark Dixon, SoCCE SOFT 131Page 19 Example 2 v1: Analysis User Requirement: –to teach students about fundamentals of software development process Software Requirements Specification software should include: –setting property at design time –setting property at run time –… –code has to fit on single slide Non-functional requirement Functional requirements
Mark Dixon, SoCCE SOFT 131Page 20 Example 2 v1: Design User interface design: Functional design: Trigger (when)Actions (what) click event of Red buttonChange Result label background to red. click event of Blue buttonChange Result label background to blue. double click event of Result labelChange Result label background to white.
Mark Dixon, SoCCE SOFT 131Page 21 Example 2 v1: UI Implementation Properties (setting at design-time): –initial value only –change using properties window name: used internally to identify object (programmer) caption: displayed on button (user)
Mark Dixon, SoCCE SOFT 131Page 22 Example 2 v1: Code Implementation Private Sub btnBlue_Click() lblResult.BackColor = vbBlue End Sub Private Sub btnRed_Click() lblResult.BackColor = vbRed End Sub Private Sub lblResult_DblClick() lblResult.BackColor = vbWhite End Sub Properties (setting at run-time) –use code, assignment operator (=) –can change while program is running btnRedbtnBlue lblResult
Mark Dixon, SoCCE SOFT 131Page 23 Sequence Execution sequence controlled in two ways: –procedures controlled by order of events –instructions (lines) controlled by order in code Private Sub btnBlue_Click() lblResult.BackColor = vbBlue End Sub Private Sub btnRed_Click() lblResult.BackColor = vbGreen lblResult.BackColor = vbRed End Sub Private Sub lblResult_DblClick() lblResult.BackColor = vbWhite End Sub VB