mark dixon, socce soft 136page 1 soft 136 01 – module introduction & overview

25
Mark Dixon, SoCCE SOFT 136 Page 1 SOFT 136 01 – Module Introduction & Overview

Upload: constance-lawson

Post on 03-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 1

SOFT 13601 – Module Introduction & Overview

Page 2: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 2

About Me

• Contact DetailsMark [email protected] 232556Portland SquareRoom B316

• AvailabilityMonday, Tuesday, Wednesday, Thursday – School of Computing Communications and Electronics (main campus)Friday – other work (usually off-campus)

Page 3: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 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

Page 4: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 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: Soft136 web-site (mdixon.soc.plymouth.ac.uk)

• Lectures:– Don’t come in after 15 minutes past the hour.

Page 5: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 5

Module FormatThe module is delivered as follows:

• Lecture: 1 hr per week, all groups, Thursdays 13:05 – 13:55

• Tutorials / Practical Session: 2 hr per weekThursdays 14:05 – 15: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)

Page 6: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 6

ScheduleWeek Start Title Topics and Concepts

No. Date

1 27-Sep Module introduction & overview Specifications, Objects, Controls, Properties, Methods, Events, Event handlers, Procedures, Instructions, Assignment, deep vs. surface learning

2 04-Oct User Interface Design Usefulness, usability, learnability, user interface design principles, incremental development, functional decomposition, verification, validation

3 11-Oct Graphics Grid system, graphics controls and methods (pset, line, circle).

4 18-Oct Data, Data-types, and Variables Types of data, data types, variable declaration & assignment

5 25-Oct Conditional execution (selection) Conditional statements (if and case statements), decision trees

6 01-Nov Iteration (repetition) Manual and automatic iteration using loops (for and while statements)

7 08-Nov Constants, Arrays, & Structures Constants, arrays, structures/records/user defined data types

8 15-Nov Procedures Abstraction, procedures.

9 22-Nov Arguments/Parameters Arguments/parameters, calling by value and by reference

10 29-Nov Functions Functions

11 06-Dec Arrays of Structures & Modules Arrays of Structures, Modules/units

12 13-Dec Passing Parameters by Reference Memory addresses, pass by value, pass by reference.

Page 7: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 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 0-471-41862-5

Page 8: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 8

Reading List 2Additional reading (the following are referred to occasionally, borrow

from library):• Pressman, R (2000) Software Engineering: a practitioner's

approach. 5th edition. McGraw-Hill. ISBN: 0-07-709677-0. • Sommerville, I (2001) Software Engineering. 6th edition. Addison-

Wesley. ISBN: 0-201-39815-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: 0-201-62769-8 – Direct Manipulation: Section 13.6, pages 270-272. – Interface Design: Chapter 24, pages 487-499.

• Shneiderman, Ben (1998) Designing the user interface: strategies for effective human-computer interaction. 3rd edition. Addison-Wesley. ISBN 0-201-69497-2004.019 SHN

Page 9: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 9

Student Background

• Typically wide range of prior experienceA. 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 allA B C D E

number ofstudents

Page 10: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 10

Attendance

• Attendance is mandatory

• This is not a distance learning course

• portal is supplement (not replacement) for attending lectures and tutorials

Page 11: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 11

Jobs

• Computer weekly

www.cwjobs.co.uk

Page 12: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 12

Student Feedback

• feedback form– filled in by students– handed in with

assignment

• this student:– failed (low

attendance, low contact with me)

– did referred work (over summer)

– passed

Page 13: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 13

Student feedback (zoom)

Page 14: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 14

Soft131 Last Year Results

• 56 students

• 19 failed initially (33%)

• offered 1 to 1 sessionsafter assignment 1

• all who did this passed *

• only 2 students failed retakes

0.00% 9.0% 4.50% Fail DNP20.71% 10.36% 5.18% Fail DNP10.00% 22.00% 16.00% 22.0% 19.00% Fail

0.00% 36.5% 18.25% Fail DNP15.71% 32.00% 23.86% 19.0% 21.43% Fail25.00% 51.50% 38.25% 5.0% 21.63% Fail

26.00% 13.00% 33.0% 23.00% Fail DNP10.00% 24.00% 17.00% 47.5% 32.25% Fail32.86% 33.00% 32.93% 26.0% 29.46% Fail67.14% 34.50% 50.82% 12.0% 31.41% Fail

0.00% 64.0% 32.00% Fail DNP34.29% 28.00% 31.14% 37.0% 34.07% Fail45.71% 22.86% 46.0% 34.43% Fail DNP49.29% 38.50% 43.89% 26.5% 35.20% Fail30.71% 15.50% 23.11% 47.5% 35.30% Fail52.14% 39.00% 45.57% 30.0% 37.79% Fail45.71% 54.00% 49.86% 26.0% 37.93% Fail

0.00% 80.5% 40.25% Fail DNP35.00% 28.50% 31.75% 49.5% 40.63%27.14% 48.50% 37.82% 46.5% 42.16%22.86% 63.00% 42.93% 43.0% 42.96%48.57% 71.00% 59.79% 27.5% 43.64% Fail32.86% 45.00% 38.93% 50.5% 44.71% *40.00% 31.00% 35.50% 55.0% 45.25% *41.43% 47.00% 44.21% 47.0% 45.61% *62.14% 34.00% 48.07% 43.5% 45.79%66.43% 33.21% 60.0% 46.61%38.57% 45.00% 41.79% 55.0% 48.39% *64.29% 56.50% 60.39% 36.5% 48.45%45.00% 45.00% 45.00% 52.5% 48.75% *58.57% 42.50% 50.54% 47.5% 49.02% *65.00% 45.50% 55.25% 50.0% 52.63% *67.14% 31.50% 49.32% 56.0% 52.66%60.71% 13.00% 36.86% 74.0% 55.43% *65.71% 44.00% 54.86% 57.0% 55.93%67.14% 64.00% 65.57% 47.5% 56.54% *47.14% 64.00% 55.57% 58.0% 56.79% *42.86% 67.00% 54.93% 61.5% 58.21%52.86% 52.50% 52.68% 69.0% 60.84% *56.43% 36.00% 46.21% 76.0% 61.11%72.86% 59.00% 65.93% 56.5% 61.21%65.00% 72.00% 68.50% 54.5% 61.50% *65.00% 65.00% 65.00% 65.5% 65.25% *67.14% 65.00% 66.07% 65.0% 65.54% *68.57% 62.00% 65.29% 67.0% 66.14% *59.29% 44.00% 51.64% 82.0% 66.82%70.71% 45.50% 58.11% 79.0% 68.55%72.86% 69.00% 70.93% 68.5% 69.71%71.43% 50.50% 60.96% 83.0% 71.98%65.71% 71.00% 68.36% 76.0% 72.18%66.43% 77.50% 71.96% 73.0% 72.48% *70.71% 69.00% 69.86% 81.0% 75.43% *76.43% 66.00% 71.21% 80.0% 75.61% *65.71% 82.00% 73.86% 79.0% 76.43% *66.43% 71.00% 68.71% 88.5% 78.61% *75.71% 76.00% 75.86% 82.5% 79.18% *

Page 15: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 15

Page 16: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 16

Session Aims & Objectives• Aims

– introduce you to fundamental event drive programming concepts

• Objectives, by end of this week’s sessions, you should be able to:

– Add controls to a form– Create Event Handler Procedures to do things in

response to an event of a object– Put Assignment instructions in the event handler

Page 17: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 17

Example: Colour Change v1Trigger (when) Actions (what)Click event of Red button

Change background to Red

Click event of Blue button

Change background to Blue

Double Click event of Result label

Change background to White

• Events:– Click: user releases

left mouse button on object

– Double Click: mouse clicked twice

Page 18: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 18

VB Environment

Toolbox

PropertiesWindow

FormWindow

ProjectExplorer

Page 19: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 19

Controls - ToolBox

• Design screens (forms) usingcontrols 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

Page 20: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 20

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

Page 21: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 21

Event Handler Procedures

Option Explicit

Private Sub btnBlue_Click() Me.BackColor = vbBlueEnd Sub

Private Sub btnRed_Click() Me.BackColor = vbRedEnd Sub

Private Sub lblResult_DblClick() Me.BackColor = vbWhiteEnd Sub

Event Handler Procedure

How many Event Handler Procedures are there?

3

Page 22: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 22

Option Explicit

Private Sub btnBlue_Click() Me.BackColor = vbBlueEnd Sub

Private Sub btnRed_Click() Me.BackColor = vbRedEnd Sub

Private Sub lblResult_DblClick() Me.BackColor = vbWhiteEnd Sub

Objects & Events

Object

Events

Page 23: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 23

Assignment Instructions

• Assignment:Object.Property = Value

Me.BackColor = vbRed

Option Explicit

Private Sub btnBlue_Click() Me.BackColor = vbBlueEnd Sub

Private Sub btnRed_Click() Me.BackColor = vbRedEnd Sub

Private Sub lblResult_DblClick() Me.BackColor = vbWhiteEnd Sub

Page 24: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 24

Example: Colour Change v2Trigger (when) Actions (what)Click event of Hello button

Put word 'Hello' in lblResult Label

Click event of Bye button

Put word 'Bye' in lblResult Label

Click event of Red button

Change background to Red

Click event of Blue button

Change background to Blue

Click event of Move button

Move text and background colour to Result2

Double Click event of Result label

Change background to White

Page 25: Mark Dixon, SoCCE SOFT 136Page 1 SOFT 136 01 – Module Introduction & Overview

Mark Dixon, SoCCE SOFT 136 Page 25

Tutorial Exercise: Colour Change• LEARNING OBJECTIVE:

to understand objects, events, properties, and event handler procedures,

• TASK 1: Get the Colour Change v1 example (from the lecture) working. (the code is provided)

• TASK 2: Add another button (you choose the colour). (You will need to work out what code to use. Use the code provided as inspiration please ask for advice/guidance if you need it)

• Task 3: Get the Colour Change v2 example (from the lecture) working. (You work out the code)