Presentation is loading. Please wait.

Presentation is loading. Please wait.

OOP 2 CHAPTER Agenda Introduction  About me  About you Course Outline Course objectives  Course outcomes Course Methodology  CATs/Assignments/Projects/Exams.

Similar presentations


Presentation on theme: "OOP 2 CHAPTER Agenda Introduction  About me  About you Course Outline Course objectives  Course outcomes Course Methodology  CATs/Assignments/Projects/Exams."— Presentation transcript:

1 OOP 2 CHAPTER 1 @geoffjuma

2 Agenda Introduction  About me  About you Course Outline Course objectives  Course outcomes Course Methodology  CATs/Assignments/Projects/Exams OOP II

3 About Me Name: Geoffrey Juma Twitter: @geoffjuma Tel: +254731408352 Research:  DSP/Embedded Systems;  Computer Vision/AI/Machine learning;  BIG Data/ Data Ming/Data Science; Education: B.Sc CS; M. Sc CE

4 About You Class expectations? Course Expectations? Life expectations?

5 Methodology Lectures Discussions Case study Class participation Labs – 10% CATS – 20% Exam – 60% Project – 10%

6 Course Outcomes The goal of the course is to develop skills such as program design and testing as well as the implementation of programs using a graphical IDE. Learn the knowledge and skills needed to develop reusable, quality programs. Increase knowledge of object-oriented design concepts; Learn the use of object-oriented design tools such as UML for modeling problem solutions and complex systems. Design and implement a suitable GUI for the front-end of an event driven object oriented program. Connect to and use Databases, by embedding SQL code in object oriented programs. Create a suitable test process to validate and verify that the software program works according to specification.

7 Course Outline Object-oriented software development Software life cycle Requirements & specifications Designing objects & classes Testing & code coverage Unified Modeling Language (UML) Programming paradigms Design patterns Concurrent and Parallel Programming Threads, synchronization Exceptions Network Programming Web Programming – Applets Relating Java to C++ Exploring C++ programs Memory management in C++

8 References Class Book (Look for it anywhere)  Object-Oriented Software Development Using Java. Xiaoping Jia. Addison Wesley, 2003, ISBN 0-201-73733-7. Other books  Head First Object-Oriented Analysis and Design. Brett D. McLaughlin, Gary Pollice, and Dave West. O’Reilly 2006.  Head First Design Patterns. Eric Freeman and Elizabeth Freeman. O’Reilly 2004.  The Object-Oriented Thought Process, 3rd edition Matt Weisfeld. Addison Wesley 2009.  The Elements of Java Style. Allan Vermeulen, et al. Cambridge University Press, 2000.

9 How to pass Attend the Lectures and Participate Submit and demo all the Labs required Complete the project and submit on time Revise/Study for the exams and CATs  Mostly cognitive questions Etc

10 INTRODUCTION

11 Foreword You know how to write Hello World and Small snippets of java code; This unit is about writing large and complex programs (applications). This is not easy! Why?  More details to take care of;  More interests to balance and juggle between  More details to keep track of The ability to design a collection of several classes to implement a large and complex application Appreciate good programming styles I.e elegance, clarity, poetry

12 Review of Java and OO Concepts Object-oriented languages are designed to facilitate structuring code at high levels of abstraction. One of the key features of these languages is the ability to structure code at the level of classes. In Java,  (almost) all code occurs in a method,  all methods belong to a class,  all classes belong to a package (we won’t go into packages in much detail).

13 Why structure Code? The main reason is that methods, classes and packages serve to group ‘related’ bits of code; bringing related bits of code together makes it easier to:  maintain that code;  (re)use that code; and  Reduce complexity (once you’ve got the hang of it!) write elegant code easily and quickly

14 OOP Structure Code/Language Level A bunch of Classes A bunch of objects Inheritance Conceptual Level Abstraction Encapsulation Information Hiding Hierarchy

15 What is a class? In a very precise sense, classes are:  collections of methods and fields  Types  Blue print/prototype for creating objects less precisely, classes  correspond to meaningful (kinds of) things. (Many introductions to OO concentrate on this latter notion of class, which can be vague and confusing.)

16 What is an Object? An object is defined by data which has some properties called attributes manipulable by defined functions called methods Objects are the basic building blocks for OOP Characteristics of objects:  State – each as a unique individual  Identity – properties that changes/attributes  Behavior – things it can do/can be done to it An object thus is anything that has state and behavior

17 Object Reference Variable An Object is an instance of a Class, it is stored some where in memory A reference is what is used to describe the pointer to the memory location where the Object resides. A variable is a means by which you can access that memory location within your application (its value is "variable"). While a variable can only point to a single memory address (if its not null), it may change and point to different locations through out the life cycle of the application

18 Access Control of class members Public accessible by anyone Protected accessible inside the class and by all of its subclasses Private accessible only inside the class, NOT including its subclasses

19 CORE OOP FEATURES Encapsulation Inheritance Abstraction Polymorphism

20 Encapsulation Encapsulation – bundling up of data and related instructions  Data Hiding – explicit classing of data as public, private of protected The point about encapsulation is more important than it might initially appear. If you hide your data members from your clients (i.e., encapsulate them), you can ensure that class invariants are always maintained, because only member functions can affect them

21 Inheritance Inheritance – The ability of an object to acquire the properties of another object. Leads to hierarchical organization of code/objects/classes

22 Abstraction and Polymorphism Abstraction - Extracting the essential details about an item or group of items, while ignoring the unessential details. In other words, it deals with the outside view of an object (interface) Interfaces Abstract classes Polymorphism – The ability of an object to take many forms/ more than one form

23 OOP vs Procedural Programming Assignment 0  Write an essay Comparing and contrast OOP and Imperative/ Procedural programming paradigms.

24 Conclusion A class should correspond to either some meaningful kind of entity in the application domain, or to an abstract data type We will look at how to identify classes methods and objects next This is a design class – get your creativity caps out of the closet


Download ppt "OOP 2 CHAPTER Agenda Introduction  About me  About you Course Outline Course objectives  Course outcomes Course Methodology  CATs/Assignments/Projects/Exams."

Similar presentations


Ads by Google