IEG 3080 Tutorial 1 Wilson Ip. Outline Lecture reviews: Some basics of Software Engineering principle Some basics of OOP How to use Visual Studio.NET.

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

Modular Programming With Functions
Programming Paradigms and languages
1 Abstract Data Types Chapter 1. 2 Objectives You will be able to: 1. Say what an abstract data type is. 2. Implement a simple abstract data type in C++
10 Software Engineering Foundations of Computer Science ã Cengage Learning.
Chapter 16: Analysis and Design (a short introduction) ● As engineers in other desciplines do, it necessary for real projects to “analyse” and “design”
OBJECT ORIENTED PROGRAMMING M Taimoor Khan
MT311 Tutorial Li Tak Sing( 李德成 ). Uploading your work You need to upload your work for tutorials and assignments at the following site:
Software Engineering and Design Principles Chapter 1.
Road Map Introduction to object oriented programming. Classes
1 Programming for Engineers in Python Autumn Lecture 5: Object Oriented Programming.
Fall 2007CS 225 Introduction to Software Design Chapter 1.
1 SWE Introduction to Software Engineering Lecture 23 – Architectural Design (Chapter 13)
Computer Programming and Basic Software Engineering 4. Basic Software Engineering 1 Writing a Good Program 4. Basic Software Engineering 3 October 2007.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
CS350/550 Software Engineering Lecture 1. Class Work The main part of the class is a practical software engineering project, in teams of 3-5 people There.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
Spring 2009CS 225 Introduction to Software Design Chapter 1.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
Programming Paradigms Imperative programming Functional programming Logic programming Event-driven programming Object-oriented programming A programming.
Test. A software house decides to develop a DVD renting program. The product manager identifies the following requirements: Every DVD will have a title,
1 ENG236: ENG236: C++ Programming Environment (2) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
Starting Chapter 4 Starting. 1 Course Outline* Covered in first half until Dr. Li takes over. JAVA and OO: Review what is Object Oriented Programming.
Object Oriented Software Development
Chapter 2: Approaches to System Development
Introduction to Object-oriented programming and software development Lecture 1.
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott COMP6325 Advanced Web Technologies Dr. Paul Walcott The University.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
1 Web-Enabled Decision Support Systems Objects and Procedures Don McLaughlin IE 423 Design of Decision Support Systems (304)
CSE 303 – Software Design and Architecture
Object Oriented Design and Programming Alan Goude Room: Sheaf 9323.
Functions Part I (Syntax). What is a function? A function is a set of statements which is split off into a separate entity that can be used like a “new.
Understand Application Lifecycle Management
Introduction to Software Design Chapter 1. Chapter Objectives  To become familiar with the software challenge and the software life cycle  To understand.
University of Palestine software engineering department Testing of Software Systems Testing throughout the software life cycle instructor: Tasneem Darwish.
CPSC 2150 August 21, Chapter 1 Object Oriented Software Development This is an introductory course In this chapter we will look at 3 topics Challenges.
CSE 219 Computer Science III Program Design Principles.
1 Systems Analysis and Design in a Changing World, Thursday, January 18, 2007.
Object-Oriented Analysis and Design Fall 2009.
1 Chapter 8 – Classes and Object: A Deeper Look Outline 1 Introduction 2 Implementing a Time Abstract Data Type with a Class 3 Class Scope 4 Controlling.
1 Software Development Software Engineering is the study of the techniques and theory that support the development of high-quality software The focus is.
Software Engineering Principles. SE Principles Principles are statements describing desirable properties of the product and process.
Object Oriented Software Development
Introducing Allors Applications, Tools & Platform.
Practical Programming COMP153-08S Week 5 Lecture 1: Screen Design Subroutines and Functions.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
Object-Oriented Programming Chapter Chapter
 Objects versus Class  Three main concepts of OOP ◦ Encapsulation ◦ Inheritance ◦ Polymorphism  Method ◦ Parameterized ◦ Value-Returning.
CS451 Software Maintenance Yugi Lee STB #555 (816) Note: This lecture was designed based on Stephen Schach’s.
Classes, Interfaces and Packages
Object Oriented Programming. OOP  The fundamental idea behind object-oriented programming is:  The real world consists of objects. Computer programs.
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
Design and implementation Chapter 7 – Lecture 1. Design and implementation Software design and implementation is the stage in the software engineering.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
Welcome to OBJECT ORIENTED PROGRAMMING Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Introduction to OOAD and UML
Low Budget Productions, LLC
Engineering and Debugging an App Chapter 15
OOP What is problem? Solution? OOP
About the Presentations
CompSci 230 Software Construction
COS 260 DAY 16 Tony Gauvin.
John D. McGregor Module 6 Session 1 More Design
What Is Good Software(Program)?
Road to Object Oriented Programming
Corresponds with Chapter 5
Presentation transcript:

IEG 3080 Tutorial 1 Wilson Ip

Outline Lecture reviews: Some basics of Software Engineering principle Some basics of OOP How to use Visual Studio.NET 2005 Create a Project Console HelloWorld program Compile and Debugging tools

Lecture reviews: Software Engineering principle Potential challenges for building a complex large scale software Difficult to debug Unreliable software might be delivered. Users change the requirement A change might propagate throughout whole system Managing large team Inconsistencies in interpreting the requirement Difficult to merge the work done by independent individuals Difficult to maintain Maintaining the code from other teams/divisions/people who have been turnover Possibly more…

Lecture reviews: Software Engineering principle Solution Source or binary code reuse adopted the well-written code (but not allowed in assignments and project) Interface and Design Pattern reuse Make system flexible to change Facilitate future maintenance Setup a effective way of communication Precise documentation Visually model the software UML Software development Methodologies WaterFall Rational Unified Process Extreme Programming Regression tool NUnit

Lecture reviews: Software Engineering principle Dealing with a complex System Divide and Conquer Break a complex problem to simple problems Separation of Interface and Implementation Promote loose coupling, modularity, encapsulation and abstraction

Object Oriented Programming Traditional programming such as C: Sequence Condition – if, else if, else Repetition – loop Recursion Variables Divide big program into subroutines for modular structure OOP uses Objects for modular structure Object is (in programming): A module that encapsulates some internal state variables with a group of methods that alone have direct access to those variables. It can be used to model any real world/abstract objects

Object Oriented Programming Example objects in real world TV state - power, volume, contrast, brightness operation - turn on, turn off, vol_up, vol_down, … to change the state In modeling, pick out some properties from the real object to be modeled Example, to model a reader Attribute : name, status, max # of books, # of book lent, …. Action : lend, return, ….

Object Oriented Programming This shows an object in programming The internal attributes cannot be changed without carrying corresponding action. You cannot decrease the number of books lent without returning the books Actually, attributes will be internal state variables, actions are the methods. Name Status max # of books # of book lent Lend Return

Object Oriented Programming Class and Object Class – blueprint of an object, specify how the object will be built IF WE REALLY BUILD IT Object – really build the product by following what is specified by the class Instantiate an object = allocate memory for attributes, codes for the methods specified in the corresponding Class Analog for the relationship Class – Mold for producing the Moon cake Objects – The Moon cakes produced by this mold

Object Oriented Programming Constructor Constructor is used to initialize the attributes when the object is created Constructor is a function, its name is the same as that of the class Constructor has no return value There can be more than one constructor in the same class (By function overloading)

How to use Visual Studio.NET 2005 Create a project Menu -> file -> new -> project Choose “Visual C#” Choose “console application” Give a project name, say “308” Choose the location, say “C:\” Then, everything will be within the directory “C:\308”

How to use Visual Studio.NET 2005 Console HelloWorld program Function “Main” is the entry pt of the whole program (same as the main() in C/C++) “static” means that it can be called even no object is allocated, just like “Console.WriteLine” You can try to simply write a line “Console.WriteLine(“Hello World”); in Main Using System; Class HelloWorld { public static void Main() { Console.WriteLine(“Hello C# world”); }

How to use Visual Studio.NET 2005 Compile and Debugging Tools Compile Menu  Build  Build Solution After compile, execute without debugging Menu  Debug  Start Without Debugging Execute with debugging Menu  Debug  Start With Debugging Debugging functions: Step-by-step execution Insert breakpoint

How to use Visual Studio.NET 2005 Compile and Debugging Tools Step-by-step execution: choose Menu  Debug  “Step Into” continue to press Menu  Debug  “Step Into” to run only the current line of code and go one step to next execution line. The value of local variable with scope of execution line is shown in left bottom box You can view a particular variable by select the variable  right click  “add watch” If execution come to function call, it jump into the function If execution come to function call, press Menu  Debug  “Step over” to skip jumping into a function If execution inside a function block, press Menu  Debug  “Step out” to jump out one level from the function block.

How to use Visual Studio.NET 2005 Compile and Debugging Tools Menu  Debug  “Step Into”

How to use Visual Studio.NET 2005 Compile and Debugging Tools Menu  Debug  “Step over” Menu  Debug  “Step Out”

How to use Visual Studio.NET 2005 Compile and Debugging Tools Insert a breakpoint : Menu  Toggle breakpoint The program will be paused when it hits the break point. You can assign break point at any line in the program. Insert break point Menu  Start with Debugging Program pause at the break points

How to use Visual Studio.NET 2005 Compile and Debugging Tools You can break the program when some condition are fulfilled. E.g. The break point below is activated only if at the execution that satisfy TestVal2 < 20

Reference Wikipedia - Process Process