University Of Karachi Department Of Computer Science

Slides:



Advertisements
Similar presentations
INHERITANCE BASICS Reusability is achieved by INHERITANCE
Advertisements

Written by: Dr. JJ Shepherd
Objectives Introduction to Inheritance and Composition (Subclasses and SuperClasses) Overriding (and extending), and inheriting methods and constructors.
ITEC200 – Week03 Inheritance and Class Hierarchies.
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
1 Chapter 7 Inheritance, Polymorphism, and Scope.
1 Evan Korth New York University Inheritance and Polymorphism Professor Evan Korth New York University.
Introduction to Data Structures, Spring 2007 Slide- 1 California State University, Fresno Introduction to Data Structure Object Oriented Programming Concepts.
1 Evan Korth New York University Inheritance and Polymorphism Professor Evan Korth New York University.
ASP.NET Programming with C# and SQL Server First Edition
8.1 Classes & Inheritance Inheritance Objects are created to model ‘things’ Sometimes, ‘things’ may be different, but still have many attributes.
Introduction To System Analysis and design
CSM-Java Programming-I Spring,2005 Objects and Classes Overview Lesson - 1.
Introduction to Object Oriented Programming. Object Oriented Programming Technique used to develop programs revolving around the real world entities In.
Chapter 11 Inheritance and Composition. Chapter Objectives Learn about inheritance Learn about subclasses and superclasses Explore how to override the.
Programming in Java Unit 2. Class and variable declaration A class is best thought of as a template from which objects are created. You can create many.
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
JAVA: An Introduction to Problem Solving & Programming, 5 th Ed. By Walter Savitch and Frank Carrano. ISBN © 2008 Pearson Education, Inc., Upper.
More on Hierarchies 1. When an object of a subclass is instantiated, is memory allocated for only the data members of the subclass or also for the members.
Object Persistence and Object serialization CSNB534 Asma Shakil.
Data Structures Using Java1 Chapter 2 Inheritance and Exception Handling.
Computer Science Projects Internal Assessment. Mastery Item Claimed Justification Where Listed Random Access File – Searching Lines P. 53 Random.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
Inheritance. Inheritance - Introduction Idea behind is to create new classes that are built on existing classes – you reuse the methods and fields and.
Class Builder Tutorial Presented By- Amit Singh & Sylendra Prasad.
Object-Oriented Programming. Objectives Distinguish between object-oriented and procedure-oriented design. Define the terms class and object. Distinguish.
Object Serialization.  When the data was output to disk, certain information was lost, such as the type of each value.  If the value "3" is read from.
Chapter 10: Introduction to Inheritance. Objectives Learn about the concept of inheritance Extend classes Override superclass methods Call constructors.
 In the java programming language, a keyword is one of 50 reserved words which have a predefined meaning in the language; because of this,
Introduction to Object-Oriented Programming Lesson 2.
Chapter 11: Advanced Inheritance Concepts. Objectives Create and use abstract classes Use dynamic method binding Create arrays of subclass objects Use.
Classes, Interfaces and Packages
Access Specifier. Anything declared public can be accessed from anywhere. Anything declared private cannot be seen outside of its class. When a member.
Quick Review of OOP Constructs Classes:  Data types for structured data and behavior  fields and methods Objects:  Variables whose data type is a class.
Written by: Dr. JJ Shepherd
Spring 2008 Mark Fontenot CSE Honors Principles of Computer Science I Note Set 20.
Basic Concepts of OOP.  Object-Oriented Programming (OOP) is a type of programming added to php5 that makes building complex, modular and reusable web.
Object orientation and Packaging in Java Object Orientation and Packaging Introduction: After completing this chapter, you will be able to identify.
1 C# - Inheritance and Polymorphism. 2 1.Inheritance 2.Implementing Inheritance in C# 3.Constructor calls in Inheritance 4.Protected Access Modifier 5.The.
Terms and Rules II Professor Evan Korth New York University (All rights reserved)
Author: DoanNX Time: 45’.  OOP concepts  OOP in Java.
JAVA: An Introduction to Problem Solving & Programming, 6 th Ed. By Walter Savitch ISBN © 2012 Pearson Education, Inc., Upper Saddle River,
1 CSE 331 Memento Pattern and Serialization slides created by Marty Stepp based on materials by M. Ernst, S. Reges, D. Notkin, R. Mercer, Wikipedia
Geoff Holmes and Bernhard Pfahringer COMP206-08S General Programming 2.
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
Java Programming: Guided Learning with Early Objects Chapter 9 Inheritance and Polymorphism.
Java Programming Fifth Edition Chapter 9 Introduction to Inheritance.
OBJECT ORIENTED PROGRAMMING II LECTURE 21 GEORGE KOUTSOGIANNAKIS
Introduction to Object-oriented Programming
Objects as a programming concept
Inheritance and Polymorphism
Chapter 11 Object-Oriented Design
An Introduction to Inheritance
Object Oriented Concepts
Object-Oriented Programming
Chapter 3 Introduction to Classes, Objects Methods and Strings
Interface.
Java Programming Language
Lecture 22 Inheritance Richard Gesick.
Inheritance, Polymorphism, and Interfaces. Oh My
Graphs Chapter 11 Objectives Upon completion you will be able to:
CSE 1030: Data Structure Mark Shtern.
Interfaces.
Advanced Programming Behnam Hatami Fall 2017.
Ship Harbor Model Department of Computer Science University of Karachi
Java Programming, Second Edition
CSE 331 Memento Pattern slides created by Marty Stepp based on materials by M. Ernst, S. Reges, D. Notkin, R. Mercer, Wikipedia
OBJECT ORIENTED PROGRAMMING II LECTURE 22 GEORGE KOUTSOGIANNAKIS
Introduction to Data Structure
Inheritance and Polymorphism
Presentation transcript:

University Of Karachi Department Of Computer Science RAH BUS SERVICE Group Members: Khawaja Hamza Bin Bashir (43) Khawaja Abeer Wani (45) Ramsha Zaib (112) Course Supervisor : Dr. Humera Tariq & Sir Usman Amjad 3/7/2017 OOP & DM .

Introduction The project is designed so as customer can reserve tickets online and can view customer route from source to destination on a map. In this system the customer can select any bus of his/her choice.

Problem statement This project is to extend in travelling, business process and communication. The individual who needs to reserve a tickets must fill all the fields in the reservation form. This system includes • Ticket Reservation. • Group bookings. • Cancel Reservation.

Importance The project traverses a lot of areas ranging from business concept to computing field and required to perform several researches to be able to achieve the project objectives. To ease customer’s task whenever they need to Reserve tickets. General customers as well as the company’s staff will be able to use the system effectively. System will be available for 24/7 except when there is a temporary reservation issue.

Sample Input

SAMPLE OUTPUT

SAMPLE OUTPUT

CLASS DIAGRAM

UML

Here we describe about Filing and information storage

What is Filing Meant to be here??? A collection of data or information that has a name, called the filename. Almost all information stored in a computer related to a program must be in a file. There are many different types of files: data files, text files, program files, directory files, binary files and so on. Different types of files store different types of information. For example, program files store programs, whereas text files store text.

Writing to a File Serializable: To serialize an object means to convert its state to a byte stream so that the byte stream can be reverted back into a copy of the object. A Java object is serializable if its class or any of its superclasses implements either the java.io.Serializable interface or its subinterface, java.io.Externalizable.  Deserialization: Deserialization is the process of converting the serialized form of an object back into a copy of the object.

Objectoutputstream: An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream. The objects can be read (reconstituted) using an ObjectInputStream. ObjectInputStream: Only objects that support the java.io.Serializable or java.io.Externalizable interface can be read from streams. The method readObject is used to read an object from the stream.

Reading From a File ObjectInputStream: Only objects that support the java.io.Serializable or java.io.Externalizable interface can be read from streams. The method readObject is used to read an object from the stream.

PACKAGING

login() Fn. Implementation.

Attribute Handling Static. • when we declared a variable Static. it's belong to the class rather than the instant of class. • The static keyword in java is used for memory management mainly. • The static variable gets memory only once in class area at the time of class loading. Private & public. • A public member can be accessed from outside the class • but if you declared your variable as Private it can not accessed outside the class

Type casting • Type casting is a way to convert a variable from one data type to another data type. • Parsing is used to convert the value of another data type.

Constructor and function calling Constructor in java is a special type of method that is used to initialize the object. Method is used to expose behavior of an object.

Method Overloading If a class have multiple methods by same name but different parameters, it is known as Method Overloading. Method overloading increases the readability of the program.

Method Overriding If subclass (child class) has the same method as declared in the parent class, it is known as method overriding in java. Method overriding is used to provide specific implementation of a method that is already provided by its super class.

Arrays of Similar Objects We use arrays list to store and manipulate the group of objects.

Inheritance Inheritance in java is a mechanism in which one object acquires all the properties and behaviors of parent object. The extends keyword indicates that you are making a new class that derives from an existing class

INTERFACE An interface is a reference type in Java. It is similar to class. It is a collection of abstract methods. A class implements an interface, thereby inheriting the abstract methods of the interface.

Exception Handling An exception is a special type of error object that is created when something goes wrong in a program.

try-catch block on Filing

try-catch block on RemoveBus()FN

If-Else Conditions

GUI using JavaFx

Login and sign up

Bus details and Add Remove Fetch Bus

Tickets Reservation

Ticket Info

Customer Ticket Details

Admin login

Warning or Error Messages

Discrete Mathematics Linear Search Algorithm Visualising of google map Shortest Path Algorithm

Linear Search Algorithm:  linear search or sequential search is a method for finding a target value within a list. It sequentially checks each element of the list for the target value until a match is found or until all the elements have been searched.

Linear Search Algorithm

Visualising of google map

Dijkstra’s Algorithm: Dijkstra's algorithm is an algorithm for finding the shortest paths between nodes in a graph, which may represent, for example, road networks. It picks the unvisited vertex with the lowest distance, calculates the distance through it to each unvisited neighbor, and updates the neighbor's distance if smaller

Learning and achievements We learnt “Graphical user interface” which was interesting We learnt about popup windows. Handling a such huge code for the very first time We learnt how to resolve errors in such a huge code. We discover new searching and sorting algorithms We learn how google map works And the group coordination was also a good experience with some enjoyments. We also gain confidence to ourselves.

Improvement and future work In future we will modify our project in to online application. We will also apply patterns.

Thank You!