Inf-1400 - Objektorientert Programmering



Similar documents
Fall 2012 Q530. Programming for Cognitive Science

6.S096 Lecture 1 Introduction to C

How to write a design document

CS 253: Intro to Systems Programming

CSC108H: Introduction to Computer Programming

Information Systems for Business Management INF612

CMSC Fundamentals of Computer Programming II (C++)

9/11/15. What is Programming? CSCI 209: Software Development. Discussion: What Is Good Software? Characteristics of Good Software?

ActionPhoto International

Course Title: Software Development

Nordic Master in Didactics of Mathematics

Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer

Linked Lists Linked Lists, Queues, and Stacks

Syllabus INFO-GB Design and Development of Web and Mobile Applications (Especially for Start Ups)

CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages. Nicki Dell Spring 2014

Distance Learning Questionnaire

An Internet Course in Software Development with C++ for Engineering Students

CLASS NAME & NUMBER: Team (ID (S, GM): INSTRUCTOR:

Chapter 3.2 C++, Java, and Scripting Languages. The major programming languages used in game development.

CSE 307: Principles of Programming Languages

Computer Science 210: Data Structures. Introduction

COMMONWEALTH OF MASSACHUSETTS BUNKER HILL COMMUNITY COLLEGE CHARLESTOWN, MASSACHUSETTS COMPUTER INFORMATION TECHNOLOGY DEPARTMENT

6.088 Intro to C/C++ Day 4: Object-oriented programming in C++ Eunsuk Kang and Jean Yang

Management Information Systems 260 Web Programming Fall 2006 (CRN: 42459)

Introduction to Python

Computers in Science Education A new Way to teach Science?

Instructional Development Unit Quality and Efficiency

Curriculum Map. Discipline: Computer Science Course: C++

GET 114 Computer Programming Course Outline. Contact: Office Hours: TBD (or by appointment)

Converting a Face-to-Face Course to a Hybrid Course

Syllabus INFO-UB Design and Development of Web and Mobile Applications (Especially for Start Ups)

Collaboration Policy Fall 2015

COURSE OUTLINE. Prerequisites: Course Description:

CS 51 Intro to CS. Art Lee. September 2, 2014

by Pearson Education, Inc. All Rights Reserved.

Assignment 1: Matchismo

Evolution of the Major Programming Languages

Provincial Learning Management System Orientation Guide for Learners Version 3, February 2014

IT3503 Web Development Techniques (Optional)

Compiling Object Oriented Languages. What is an Object-Oriented Programming Language? Implementation: Dynamic Binding

Programming Languages

Flipping Courses: Transitioning From Traditional Courses to a Blended Learning Approach 1

An Exploration of the Effects of Performance Appraisal in Municipal Health Services

Goal: Practice writing pseudocode and understand how pseudocode translates to real code.

COMP 1405 Intro. to Computer Science I. Course Outline (F2015)

INFO 241 INTRODUCTION TO DATABASE MANAGEMENT AND PROGRAMMING

The C Programming Language course syllabus associate level

El Dorado Union High School District Educational Services

TECHNOLOGY AND SAFETY IN THE HIGH NORTH

A Comparison of Programming Languages for Graphical User Interface Programming

Software Reuse. Software Engineering Course Given by: Arnon Netzer. To use parts of one product in another product with a different function.

Game Programming for Complex System Development and ABET Accreditation Assessment

CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team

Recursive Implementation of Recursive Data Structures

Best Practices in Online Teaching 2012

The course assumes successful completion of CSCI E-50a and CSCI E-50b, i.e. at least two semesters of programming, with a grade of C- or better.

BSN Program Nursing 3235: Self and Others III Reflection on Caring Practice Section 1 and 2

CURRICULUM VITAE - HANS ANTON STUBBERUD

Multiplayer Game Programming ITP 484x (4 Units)

02-201: Programming for Scientists

Spring 2013 Structured Learning Assistance (SLA) Program Evaluation Results

Information identifying the holder of the qualification Family name(s): National identification: 2 Information identifying the qualification

General Procedures for Developing an Online Course

How to Pass Physics 212

: Foundations of Game Programming

Course Outline 2015 INFOSYS 110: BUSINESS SYSTEMS (15 POINTS) Semester Two (1155)

Bachelor of Games and Virtual Worlds (Programming) Subject and Course Summaries

Adoption of a New Project-Based Learning (PBL) Curriculum in Information Technology

Introduction to Programming

UCT COLLEGE OF ACCOUNTING. ITC Boost Course

CS 378: Computer Game Technology

CSCI 528: OBJECT ORIENTED PROGRAMMING, Fall 2015

UNIVERSITY OF MICHIGAN SCHOOL OF INFORMATION SI301: Models of Social Information Processing Syllabus

Software Development Methodologies

Monitors, Java, Threads and Processes

Moving from CS 61A Scheme to CS 61B Java

Business Ethics (BUS 105) Cycle II, Spring, 2012 Semester

Python, C++ and SWIG

Master s Programme in Telemedicine and E-health

Online Student Orientation

National Louis University Credit Hour Compliance Audit Form

Business Database Systems

Course Computer Science Academic year 2012/13 Subject Databases I ECTS 5

Transcription:

Inf-1400 - Objektorientert Programmering Introduction John Markus Bjørndalen Department of Computer Science University of Tromsø Norway 9. Januar 2014 9. Januar 2014 1 / 16

Course staff Responsible / lecturer John Markus Bjørndalen Vitass Edvard Pedersen Marius Andreassen 9. Januar 2014 2 / 16

Topics About the course Practical things Textbook Programming language(s) Introduction to Object-Oriented Programming 9. Januar 2014 3 / 16

Course description - INF-1400 Innhold Emnet gir en innføring i objektorientert programmering. Dette inkluderer en innføring i sentrale begreper som innkapsling, klasser, arv og polymorfi. Metoder, grensesnitt og samspill mellom objekter er også sentralt i emnet. http://uit.no/studiekatalog/emner/2015/var/inf-1400-1 9. Januar 2014 4 / 16

Textbook Python 3 Object Oriented Programming, Dusty Phillips http://shop.oreilly.com/product/9781849511261.do 9. Januar 2014 5 / 16

(Some) Python advantages High Level programming language, also useful for scripting Described as executable pseudo code Readable (and often short!) code Plenty of libraries Interpreted One of Python s drawbacks Interpreted (slow, but not always) 9. Januar 2014 6 / 16

PyGame Used for the mandatory exercises. http://www.pygame.org/ 9. Januar 2014 7 / 16

Mandatory exercises Last year: Breakout (game) Boids (simulation of flocking birds) Mayhem / XPilot (game) 9. Januar 2014 8 / 16

Practical issues Make sure you register for the course and have access to Fronter (http://fronter.com/uit),. Please give us feedback We do not have a good tool for tracking students with mandatory assignments from previous years. To avoid confusion when we approve students for the exam, please hand in something on the mandatory assignments. An empty file named I_DID_THIS_IN_2014.txt would be fine (we can then check that you did it). 9. Januar 2014 9 / 16

Quick OO-introduction: lists List abstraction from inf-1100: a data structure and a set of functions. Want to provide multiple list types: General list implementation Optimized for adding items at the end Optimized for accessing the nth item A sorted list that stays sorted when it is modified Need multiple data structures and a set of functions for each data structure. 9. Januar 2014 10 / 16

Quick OO-introduction: lists Given a list pointer, which list_add() function do we call?... list_add_last(list, item);? sorted_list_add(list, item);? append_list_add(list, item);?... 9. Januar 2014 11 / 16

Quick OO-introduction: lists One solution test for list type - test everywhere you use a list?... if (list->type == LIST_TYPE_DEFAULT) list_add_last(list, item); else if (list->type == LIST_TYPE_SORTED) sorted_list_add(list, item); else if (list->type == LIST_TYPE_APPEND) append_list_add(list, item);... And modify all locations when you introduce a new type? 9. Januar 2014 12 / 16

Quick OO-introduction: lists One solution test for list type - test everywhere you use a list?... if (list->type == LIST_TYPE_DEFAULT) list_add_last(list, item); else if (list->type == LIST_TYPE_SORTED) sorted_list_add(list, item); else if (list->type == LIST_TYPE_APPEND) append_list_add(list, item);... And modify all locations when you introduce a new type? ohn Markus Bjørndalen ( Department of Computer Science University Inf-1400 -of Objektorientert Tromsø Norway Programmering ) 9. Januar 2014 12 / 16

Quick OO-introduction: lists OO-solution: add the functions (methods) to the objects. // C++ class class List { ListNode *head; int numitems;... int add(void *item) { return addlast(item); } int addlast(void *item); }; int List::addLast(void *item) {... 9. Januar 2014 13 / 16

Quick OO-introduction Basic idea: The object has a known interface Allows the user/programmer to handle objects without caring about the implementation Can use multiple implementations (types/classes) as long as they have the same interface 9. Januar 2014 14 / 16

Quick OO-introduction Basic concepts: The object abstraction includes methods, or operations on the objects. Objects are created (instantiated) based on classes. A single object is called an instance of its class. Data in a class or object is called an attribute. Operations in a class are called methods. Signature: parameters and return value of a method. 9. Januar 2014 15 / 16

Next part More on objects Introduction to Python 9. Januar 2014 16 / 16