Semester 1, 2015: Introduction and Admin

Download Report

Transcript Semester 1, 2015: Introduction and Admin

CITS1001
OBJECT ORIENTED PROGRAMMING
AND SOFTWARE ENGINEERING
Semester 1, 2015: Introduction and Admin
Dr. Lyndon While
Computer Science & Software Engineering
2
Unit objectives
• In CITS1001 you will learn how to write simple computer
programs using the Java programming language
• Today’s lecture will give you an overview of the unit and
what you will have learnt by the end of the semester
Computer Science is no more about computers than
Astronomy is about telescopes. (Edsger Dijkstra)
3
Unit philosophy
• CITS1001 is a first programming unit
• No prior programming experience is assumed
• But students’ backgrounds vary widely!
• No one can turn you into a productive programmer in
one three-month course
• CITS1001 is the first in a sequence of units giving you
• A detailed understanding of programming and software engineering
• Excellent problem-solving skills
• Exposure to a wide range of topics in ICT
4
Lectures
• Two lectures/week
• Noon on Tuesdays in Wilsmore LT
• Noon on Thursdays in Ross LT
• The lecture slides will be available from the unit web-site
• All lectures are recorded, and the recordings
will be available via the LMS
• But note that sometimes recordings fail!
• Nothing else in CITS1001 will be available via the LMS
• Lectures may occasionally be cancelled,
e.g. during projects
• This will be announced well in advance
5
Labs
• The labs are where you practice creating programs
• The exercises for each lab will be on a lab-sheet on the web-site
• Supervised labs will be held in 2.05, starting in Week 2
• Several sessions are available
• Two hours of each session are supervised
• Enroll yourself in one session
• But feel free to attend as many sessions as you like
• Or to do the work at other times
• Free Wi-Fi is also available
• So bring your laptop!
6
Workshops
• 2pm on Fridays in Weatherburn LT, starting in Week 2
• No new material
• Student-driven questions
• Additional examples complementing the lectures
• Aimed principally at students who feel they need
extra support
• All questions are welcome, but priority will be given to
more-basic questions
The only stupid question is the one that isn’t asked!
7
Online
• Everything that is distributed in CITS1001 will be on
http://undergraduate.csse.uwa.edu.au/courses/CITS1001
• The only exception is the lecture recordings,
which will be available via the LMS
• Familiarise yourself with the web-site!
• You need to be able to find things quickly when required
8
help1001
• Online discussion forum, based on the philosophy of
READ FIRST: if the answer is not there, THEN POST
• Asking questions is useful
• Normally the quickest way to get help
• Sometimes just formulating a question properly
is enough for you to realise what the answer is
• Answering questions is useful
• Explaining something helps you to understand it
• And it generates good karma too!
9
Announcements
• Announcements will be made in three places
• On the unit noticeboard on the web-site
• In CITS1001 lectures
• On help1001
When an announcement has been made in these
three places, we will assume that you are aware of it.
10
Text and other resources
• The text in CITS1001 is Objects First with Java,
Barnes and Kölling, Fifth edition
• Earlier editions should be fine
• Other useful resources are available on the web-site
• But there are thousands of Java resources out there
• Go and look!
• If you find something useful, please post a message on help1001
so others can benefit
11
BlueJ
• Programming activities in the CITS1001 labs will be
based on the BlueJ IDE
• “A free Java development environment designed for beginners”
• You can download BlueJ for your home machine
for free at www.bluej.org
• It is available for all major platforms
• You can use any Java system you like at home
• But all work submitted for assessment will be tested on BlueJ
12
Assessment
• Assessment is based on both understanding concepts
and on creating systems
• Mid-semester test
• Two programming projects
• Final exam
• Everyone here is capable of passing CITS1001
• But history tells me that 10-20% of the group will fail
• Which subset do you want to be in?
13
Seeking help
• There are many avenues for getting help in CITS1001
• Ask questions in or after lectures
• Lab supervisors
• The workshop
• help1001
• Consultation times
• www.student.uwa.edu.au/learning
• The world-wide web
• The only stupid question is the one that isn’t asked!
• In a group this size, if you don’t understand something,
certainly there will be others in the same situation
14
UWA compulsory online modules
• All students are required to complete
three online learning modules
• Academic Conduct Essentials
• Communication and Research Skills
• Indigenous Study Essentials
• www.student.uwa.edu.au/learning/resources has the
details of these modules
15
Things to do this week
• Set up your UWA computer account
• www.ecm.uwa.edu.au/students/itsupportnew
• Sign up in OLCR for a lab class (but labs start in Week 2)
• Print out these lecture notes
• And review them!
• Get a copy of the text
• And start reading it!
• Familiarise yourself with the unit web-site
• Install BlueJ on your home computer
• And if you will be using your laptop on UWA’s Wi-Fi,
set up Unifi wireless access
16
What is a computer program?
• A sequence of elementary instructions,
that when followed achieves a specified goal
• A procedure, a recipe, an algorithm
1. Heat oil in wok.
2. Stir fry 1 clove garlic, 1 tbsp black beans, 100g meat.
3. Add 2 small bok choy and toss to coat.
4. Scatter a pinch of sugar and add 2 tbsp water.
5. Reduce heat, cover, and cook for two minutes.
6. Serve with rice.
Stephanie Alexander, the cook’s companion
17
What is a programming language?
• A program for a computer to follow must be expressed
completely unambiguously
• There are many different programming languages
in which programs can be written
• In order to write a working program, you need to learn
• the vocabulary and syntax of the language, so you can write
statements that make sense
• how to make sequences of legal statements that do simple tasks
• how to express what you want the computer to do in a simple
enough way to translate into the programming language
• Similar to learning the words, how to form sentences,
and how to write a story, in learning a human language
18
Programming in the large
• Most important computer programs these days
• run continuously
• respond to input from users and other programs
• deliver output to users and other programs
• are programmed by large teams of programmers
• are too big and complex for any one person to understand
• For example, a web browser
• responds to mouse clicks and text entries
• communicates with computers across the Internet
• formats and displays web pages
• starts up “helper applications” as necessary
19
Complexity
• Writing programs is largely about managing complexity
• How is something complex organized in the real world?
• Consider a restaurant ...
• Diners want meals
• Chefs prepare dishes
• Waiters take orders, and bring food to the tables
• Busboys collect and wash plates
• Barmen prepare and serve drinks
• The maitre’d makes reservations and seats diners
Each type of person provides a narrow range of
services. The restaurant involves the co-operative
interaction of all the restaurant staff and clients.
20
Object Orientation
Chicken and bok
choy, please
Jan
No. 14 and
No. 67
Bob
<meal>
<dishes>
Your meal,
madam
Diner
Ted
Waiter
Ding!
Chef
21
Object Oriented Programming
• OOP refers to the process of designing and
implementing a program as a co-operative
community of interacting objects
• objects provide a small number of relatively simple services
• objects communicate to exchange information
• complex behaviour is achieved by the co-operation of objects
• Using objects allows us to focus on a problem at a
high level without worrying about the minor details
• That is, we use ABSTRACTION to manage COMPLEXITY
22
What does OOP provide?
• Complexity management
• encapsulation and information hiding work on the principle that
objects should interact only through pre-specified interfaces
• software development can be divided between independent teams
• Reusable software
• class libraries provide easy access to many standard services
• developing software components that match the reliability and
interchangeability of hardware components is an elusive goal
• Natural modelling
• problem identification, system design, and program implementation
all follow the same process