M1G413283 Introduction to Programming 2 1. Designing a program.

Slides:



Advertisements
Similar presentations
© 2010 Bennett, McRobb and Farmer1 Use Case Description Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
Advertisements

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Introduction To System Analysis and Design
Documenting Requirements using Use Case Diagrams
Design: Coupling and Cohesion How to write classes in a way that they are easily understandable, maintainable and reusable.
© Copyright Eliyahu Brutman Programming Techniques Course.
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
Russell Taylor Lecturer in Computing & Business Studies.
Supplement 02CASE Tools1 Supplement 02 - Case Tools And Franchise Colleges By MANSHA NAWAZ.
M1G Introduction to Database Development 1. Databases and Database Design.
Software engineering Olli Alm Lecture 2: requirements, modelling & representation.
Introduction to Programming. To gain a sound knowledge of programming principles To gain a sound knowledge of object- orientation To be able to critically.
CO320 Introduction to Object- Oriented Programming Michael Kölling 3.0.
1 Flash Programming Introduction Script Assist. 2 Course Description This course concentrates on the teaching of Actionscript, the programming language.
5.0 Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling.
Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
Object Oriented Software Development 1. Introduction to C# and Visual Studio.
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
Multimedia Authoring Tools Lecture 13
USE Case Model.
TC2-Computer Literacy Mr. Sencer February 8, 2010.
1 Programming James King 12 August Aims Give overview of concepts addressed in Web based programming module Teach you enough Java to write simple.
1 Programming Concepts Module Code : CMV6107 Class Contact Hours: 45 hours (Lecture 15 hours) (Laboratory/Tutorial 30 hours) Module Value: 1 Textbook:
CONTROLSITE & Accessibility Independence for All Presented by: John Leal Goss Interactive Production Team.
9/5/2015 Spring Introduction to Engineering 161 Engineering Practices II Joe Mixsell Phone:
Introduction CSE 1310 – Introduction to Computers and Programming
M1G Introduction to Programming 2 4. Enhancing a class:Room.
Software development. Chapter 1 – What is software development?
Unit B065 – Coding a solution PREP WORK 1)Make sure you keep a work log / diary. Use the table on page 16 of the hand book as a template 2)Keep a bibliography.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
5.0 Objects First with Java A Practical Introduction using BlueJ Introduction to Computer Science I Instructor: Allyson Anderson.
Lecture 1 Programming in C# Introducing C# Writing a C# Program.
M1G Introduction to Database Development 6. Building Applications.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Designing classes How to write classes in a way that they are easily understandable, maintainable and reusable 3.0.
Introduction To System Analysis and Design
University Of Palestine. Department of Information Technology.
Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.
CS 390 Unix Programming Summer Unix Programming - CS 3902 Course Details Online Information Please check.
Chapter 8 Collecting Data with Forms. Chapter 8 Lessons Introduction 1.Plan and create a form 2.Edit and format a form 3.Work with form objects 4.Test.
1 ISA&D7‏/8‏/ ISA&D7‏/8‏/2013 Methodologies of the SDLC Traditional Approach to SDLC Object-Oriented Approach to SDLC CASE Tools.
1 Extend is a simulation tool to create models quickly, with all the blocks you need and without even having to type an equation. You can use a series.
Systems Analysis and Design in a Changing World, 3rd Edition
Object-Oriented Analysis and Design Fall 2009.
COMU114: Introduction to Database Development 1. Databases and Database Design.
Designing Classes 2 How to write classes in a way that they are easily understandable, maintainable and reusable.
Designing classes How to write classes in a way that they are easily understandable, maintainable and reusable 5.0.
Design Model Lecture p6 T120B pavasario sem.
Object-Oriented Analysis and Design ธนวัฒน์ แซ่ เอียบ.
5.0 Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling.
Introduction to Interactive Media Interactive Media Tools: Authoring Applications.
M1G Introduction to Programming 2 5. Completing the program.
Database for online bookstore Yaxian Yao
M1G Introduction to Programming 2 3. Creating Classes: Room and Item.
COMP2110 Software Design in 2003 ● a(nother) framework for Software Engineering ● the Software Engineering ideas and concepts in comp2110 ● Organisation.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
1 COS 260 DAY 12 Tony Gauvin. 2 Agenda Questions? 5 th Mini quiz –Chapter 5 40 min Assignment 3 Due Assignment 4 will be posted later (next week) –If.
Programming. To gain a sound knowledge of programming principles To gain a sound knowledge of object- orientation To be able to critically assess the.
1 Unified Modeling Language Michael K. Wildes University of California, Riverside – Extension Program Presentation 2.
introductionwhyexamples What is a Web site? A web site is: a presentation tool; a way to communicate; a learning tool; a teaching tool; a marketing important.
Object Oriented Analysis & Design By Rashid Mahmood.
V7 Foundation Series Vignette Education Services.
Chapter 1 WHAT IS A COMPUTER Faculty of ICT & Business Management Tel : BCOMP0101 Introduction to Information Technology.
OCR A Level F453: High level languages Programming techniques a. identify a variety of programming paradigms (low-level, object- oriented,
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Unified Modeling Language
Introduction to Unified Modeling Language (UML)
Introduction CSE 1310 – Introduction to Computers and Programming
Presentation transcript:

M1G Introduction to Programming 2 1. Designing a program

Teaching staff Jim Paterson Room M628 Katrin Hartmann Room 611 Introduction to Programming 2 1. Designing a program 2

Online resources Blackboard Announcements Assessment information Course website Can be accessed through Blackboard Lecture notes, lab & tutorial sheets, etc Links to other resources Introduction to Programming 2 1. Designing a program 3

Reading No set text – notes will be provided The following books are recommended as additional reading: Objects First with Java: A Practical Introduction Using BlueJ by David J. Barnes and Michael Kolling (ISBN ) Studying Programming by Sally Fincher (ISBN ) Introduction to Programming 2 1. Designing a program 4

Assessment Class test Lab exercises PeerWise Introduction to Programming 2 1. Designing a program 5

Models in software development A software system can be modelled using, for example, class diagrams A model of the data in the system can be used to help design a database A model can also be used to help design and create the software application, or program, which actually carries out the functions of the system Introduction to Programming 2 1. Designing a program 6

Java programs A Java program can be: A few lines of code which perform a single function, for example to add two numbers A large enterprise system consisting of many Java classes which provide very complex services Anything in between... Introduction to Programming 2 1. Designing a program 7

Java programs User interface can be: Windows application Web pages Web page applets Phone applications Games Embedded Command line etc... Introduction to Programming 2 1. Designing a program 8

Object-oriented programs Java is an object-oriented programming language When an object-oriented program is running, it creates objects which work together, or collaborate, to perform the required actions These objects often represent entities in the system GCU Tours system has objects representing customers, bookings, and so on Introduction to Programming 2 1. Designing a program 9

Classes and objects An OO program creates objects as it runs Nees to have a template which specifies what type of object will be created and what that type of object can do This template is called a class In fact, when you write a program, you are actually writing the templates An object is a single instance of a class – there can be many objects of the same type Introduction to Programming 2 1. Designing a program 10

Class contents A class specifies the following for the objects it is used to create: The name of the type of object (e.g. Customer) The properties which each object will have (e.g. name) The actions which each object can perform (e.g. change password) The way in which each object is linked with other objects (e.g. with Booking objects) Introduction to Programming 2 1. Designing a program 11

Other languages Other popular object-oriented languages include C#, Visual Basic.NET, C++, Python In your university career you will come across a number of languages Many of the techniques which you learn with Java have equivalents in other languages Once you learn Java it is relatively easy to adapt to others. Introduction to Programming 2 1. Designing a program 12

What do classes represent? Information May be information which needs to be stored permanently - database Introduction to Programming 2 1. Designing a program 13

What do classes represent Not all classes represent information Other roles for classes: Getting input from the user and displaying output Controlling the flow of activity while the program runs Other specialised tasks for example formatting output, getting information into and out of the database, and so on Introduction to Programming 2 1. Designing a program 14

The GCU Adventure Game Simple example of a system which uses objects which do a range of jobs and work together as a complete program The GCU game is a text adventure game (interactive fiction) Inspired by Hitchhikers’ Guide to the Galaxy game (but not as exciting!) Borrowed liberally from example in Barnes and Kolling book Introduction to Programming 2 1. Designing a program 15

Description of the game The game centres around characters travelling through a world which consists of rooms Each room has a description Rooms have exits which lead to other rooms Each room can contain several items which may be used by a character when in that room Introduction to Programming 2 1. Designing a program 16

Description of the game An item will also have a description A player navigates through a world by typing commands (go north, go south, quit, and so on) The game can be played by several players Introduction to Programming 2 1. Designing a program 17

Objects in the game game – this will be an object which sets up the game world and controls the game play There will be only one Game object room – this will be an object which represents a room in the game world There may be many rooms. item – this will be an object which represents an item in a room There may be several items in each room. Introduction to Programming 2 1. Designing a program 18

Objects in the game description – this simply describes a room or item a property rather than an object in its own right exit – an exit from a room is really just a way into another room exit is actually a way of referring to a room object player – this will be an object which represents a player player will be in one room at any time Introduction to Programming 2 1. Designing a program 19

Objects in the game There may be several players in the game. Each player should have a name, which is a property of the object. command – this will be an object as the job of representing players’ actions may be quite complicated one command object for each input entered by a player. Others may be required as program develops Introduction to Programming 2 1. Designing a program 20

Model for the game Class diagram shows classes and properties identified, and suggests how they may be linked, or associated Introduction to Programming 2 1. Designing a program 21

Importance of the class diagram While it is usually not the only part of a model of a system, the class diagram is very important when you start to build the system as a Java program The classes become the Java classes which you need to write Other diagrams are also useful, e.g. Activity, use case, sequence Introduction to Programming 2 1. Designing a program 22

What’s next? Build incrementally a working implementation of the “World of GCU” adventure game As we do so you will learn about some new programming techniques and tools as they are needed You will also learn how the associations between classes in the game are implemented in Java Introduction to Programming 2 1. Designing a program 23