Workshop on Graph Theory academy.zariba.com 1. Workshop Contents 1.What are graphs? 2.Are they useful? 3.Implementing our own Generic Graph 4.Depth First.

Slides:



Advertisements
Similar presentations
Final and Abstract Classes
Advertisements

Abteilung für Telekooperation Softwareentwicklung 2 UE SE2UE_ Vererbung (Inheritance)
Object Oriented Programming with Java
CLASS INHERITANCE Class inheritance is about inheriting/deriving properties from another class. When inheriting a class you are inheriting the attributes.
Inheritance. Many objects have a hierarchical relationship –Examples: zoo, car/vehicle, card game, airline reservation system Inheritance allows software.
1 Chapter 6: Extending classes and Inheritance. 2 Basics of Inheritance One of the basic objectives of Inheritance is code reuse If you want to extend.
Objectives Introduction to Inheritance and Composition (Subclasses and SuperClasses) Overriding (and extending), and inheriting methods and constructors.
Chapter 10: Introduction to Inheritance
Meeting #1 – November 2010 – Intro to C# Homework Assignments Svetlin Nakov Telerik Corporation
ITEC200 – Week03 Inheritance and Class Hierarchies.
1 CS1001 Lecture Overview Homework 3 Homework 3 Project/Paper Project/Paper Object Oriented Design Object Oriented Design.
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
© 2006 Pearson Addison-Wesley. All rights reserved4-1 Chapter 4 Data Abstraction: The Walls.
Advanced Object-Oriented Programming Features
© 2006 Pearson Addison-Wesley. All rights reserved4-1 Chapter 4 Data Abstraction: The Walls.
1 CS1001 Lecture Overview Object Oriented Design Object Oriented Design.
Data Abstraction: The Walls
A Binary Search Tree Implementation Chapter 27 Slides by Steve Armstrong LeTourneau University Longview, TX  2007,  Prentice Hall.
Object-Oriented Programming Fundamental Principles – Part I
1.11 Introduction to OOP academy.zariba.com 1. Lecture Content 1.What is OOP and why use it? 2.Classes and objects 3.Static classes 4.Properties, fields.
2.5 OOP Principles Part 1 academy.zariba.com 1. Lecture Content 1.Fundamental Principles of OOP 2.Inheritance 3.Abstraction 4.Encapsulation 2.
2.5 OOP Principles Part 2 academy.zariba.com 1. Lecture Content 1.Polymorphism 2.Cohesion 3.Coupling 2.
Abstraction, Inheritance, and Polymorphism in Java.
Svetlin Nakov Telerik Corporation
Inheritance using Java
UFCEUS-20-2 : Web Programming Lecture 5 : Object Oriented PHP (1)
Object Orientation An Object oriented approach views systems and programs as a collection of interacting objects. An object is a thing in a computer system.
CSM-Java Programming-I Spring,2005 Objects and Classes Overview Lesson - 1.
An Object-Oriented Approach to Programming Logic and Design
OBJECT ORIENTED PROGRAMMING CONCEPTS ISC 560. Object-oriented Concepts  Objects – things names with nouns  Classes – classifications (groups) of similar.
Introduction to Object Oriented Programming. Object Oriented Programming Technique used to develop programs revolving around the real world entities In.
Introduction to Data Structures
Tuc Goodwin  Object and Component-Oriented Programming  Classes in C#  Scope and Accessibility  Methods and Properties  Nested.
OBJECT-ORIENTED PROGRAMMING (OOP) WITH C++ Instructor: Dr. Hany H. Ammar Dept. of Electrical and Computer Engineering, WVU.
Information Systems Engineering
Designing Classes Chapter 3. 2 Chapter Contents Encapsulation Specifying Methods Java Interfaces Writing an Interface Implementing an Interface An Interface.
Module 10: Inheritance in C#. Overview Deriving Classes Implementing Methods Using Sealed Classes Using Interfaces Using Abstract Classes.
8. Inheritance “Is-a” Relationship. Topics Creating Subclasses Overriding Methods Class Hierarchies Abstract Class Inheritance and GUIs The Timer Class.
CS451 - Lecture 2 1 CS451 Lecture 2: Introduction to Object Orientation Yugi Lee STB #555 (816) * Acknowledgement:
Inheritance. Inheritance - Introduction Idea behind is to create new classes that are built on existing classes – you reuse the methods and fields and.
Data Structures academy.zariba.com 1. Lecture Content 1.Linear Data Structures 2.Trees and Graphs* 3.Dictionaries and Hash Tables 4.Homework 2.
Interfaces Chapter 9. 9 Creating Interfaces An interface is a contract. Every class that implements the interface must provide the interface’s defined.
Introduction to Object-Oriented Programming Lesson 2.
Module 9. Dealing with Generalization Course: Refactoring.
Copyright © 2012 Pearson Education, Inc. Chapter 10 Advanced Topics.
Software Construction Lab 05 Abstraction, Inheritance, and Polymorphism in Java.
1 Inheritance One of the goals of object oriented programming is code reuse. Inheritance is one mechanism for accomplishing code reuse. It allows us to.
Geoff Holmes and Bernhard Pfahringer COMP206-08S General Programming 2.
Chapter 11: Abstract Data Types Lecture # 17. Chapter 11 Topics The Concept of Abstraction Advantages of Abstract Data Types Design Issues for Abstract.
Inheritance Class Hierarchies SoftUni Team Technical Trainers Software University
CPRG 215 Introduction to Object-Oriented Programming with Java Module 3- Introduction to Object Oriented Programming concepts Topic 3.1 Fundamental Concepts.
OOP: Encapsulation &Abstraction
Object-Oriented Programming Concepts
University Of Karachi Department Of Computer Science
Abstraction, Interface, Inheritance, Polymorphism, Override / Overload
2.7 Inheritance Types of inheritance
JavaScript OOP academy.zariba.com.
Object Oriented Analysis and Design
Inheritance Basics Programming with Inheritance
Java Programming Language
Lecture 22 Inheritance Richard Gesick.
Interfaces.
Computer Programming with JAVA
Software Design and Architecture
By Rajanikanth B OOP Concepts By Rajanikanth B
CIS 199 Final Review.
OOP Aga private institute for computer science 5th grade
Final and Abstract Classes
Object Oriented Design & Analysis
Presentation transcript:

Workshop on Graph Theory academy.zariba.com 1

Workshop Contents 1.What are graphs? 2.Are they useful? 3.Implementing our own Generic Graph 4.Depth First Search 5.Hacking the “Wordz” game 6.Optional exercises 2

1. What are graphs? 3 A graph is roughly said a collection of vertices (points) and edges (lines) between them. Edges can be directed, undirected, coloured, weighted etc.

2. Are they useful? 4 Well… yes. They have some really interesting applications Pathfinding (GPS systems) Matchings Algorithms NoSQL databases Many more

2. Are they useful? 5

6

7

8

3. Implementing our own Generic Graph 9 We will be revising and extending our knowledge on: Generic classes Quality Code Inheritance Abstraction Encapsulation Cohesion Coupling Algorithms

4. Depth-First-Search 10

5. Hacking the “Wordz” game 11

6. Optional Homework 12 1.Implement the Breadth-First-Search algorithm. 2.Read online and implement Dijkstra’s algorithm. 3.Create a Cycle class on n vertices which inherits from Graph. 4.Create a Path class on n vertices which inherits from Graph.

Abstraction 13 Abstraction means ignoring irrelevant features, properties, or functions and emphasizing on the ones relevant to the specific project Abstraction helps managing complexity Abstraction in.Net can be done with the use of abstract classes or interfaces (or both)

Interfaces 14 Interfaces define a set of operations and attributes They do not provide any implementation – only a contract for implementing the defined features of a class Can be extended by other interfaces Cannot be instantiated

Abstract Classes 15 Abstract classes are a mix between an interface and a class Partially or fully provide implementation Non implemented methods are declared as abstract and are left empty (same as interfaces) Cannot be instantiated Child classes, which are not abstract, should implement all abstract methods

4. Encapsulation 16 Fields are always declared private Constructors are almost always public Interface methods are always public Non-interface methods are declared private or protected Hides implementation details and reduces complexity

Homework We are given a school. In the school there are classes of students. Each class has a set of teachers. Each teacher teaches a set of disciplines. Students have a name and a unique class number. Classes have unique text identifier. Teachers have a name. Disciplines have a name, number of lectures and number of exercises. Both teachers and students are people. Students, classes, teachers and disciplines could have optional comments (free text block). Your task is to identify the OOP classes, their attributes and operations, encapsulate their fields, define the class hierarchy and create a class diagram.

Homework Define an abstract class Human with a first name and last name. Define a new class Student which is derived from Human and a has a new field – grade. Define class worker derived from Human with a new property WeekSalary and WorkHoursPerDay and a method MoneyPerHour() which returns the money earned per hour. Define the constructors and properties for this hierarchy. Initialize a list of 10 students and sort them by grade in ascending order (Linq?). Initialize a list of 10 workers and sort them by money per hour in descending order. Merge the lists and sort them by first name and last name

19 References

20 Zariba Academy Questions