CS 210 DATA STRUCTURES AND ALGORITHIMS Fall 2006.

Slides:



Advertisements
Similar presentations
1 Classes and Data Abstraction Chapter What a Class ! ! Specification and implementation Private and public elements Declaring classes data and.
Advertisements

1 Chapter 11 Structured Types, Data Abstraction and Classes Dale/Weems/Headington.
CS 331 / CMPE 334 – Intro to AI CS 531 / CMPE AI Course Outline.
CSc 160 Overview of Fundamentals of Computer Programming II Spring (SO1) 2004.
1 Lecture 29 Chapter 11 Structured Types, Data Abstraction and Classes Dale/Weems/Headington.
Course Introduction Computer Science Department CS141:Computer Programming 1 Fall 2014 Dr. Hamid Al-Hamadi.
CENG 213 Data Structures Department of Computer Engineering Middle East Technical University Fall 2014 CENG 213 Data Structures 1.
1 Abstract Data Type (ADT) a data type whose properties (domain and operations) are specified (what) independently of any particular implementation (how)
Review of C++ Programming Part II Sheng-Fang Huang.
Computer Science 102 Data Structures and Algorithms V Fall 2009 Lecture 1: administrative details Professor: Evan Korth New York University 1.
 2003 Prentice Hall, Inc. All rights reserved. 1 Introduction to Classes and Objects Outline Introduction Classes, Objects, Member Functions and Data.
CSc 2310 Principles of Programming (Java) Dr. Xiaolin Hu.
CPS120: Introduction to Computer Science Fall: 2002 Instructor: Paul J. Millis.
CST 229 Introduction to Grammars Dr. Sherry Yang Room 213 (503)
1 My Experiences as Faculty Member and Researcher Dr. Kalim Qureshi.
CS355 Advanced Computer Architecture Fatima Khan Prince Sultan University, College for Women.
Objected Oriented Programming & Design JAVA Shishir Gupta (704) (704)
CSCI 51 Introduction to Computer Science Dr. Joshua Stough January 20, 2009.
CS 140 Computer Programming (I) Second semester (3 credits) Imam Mohammad bin Saud Islamic University College of Computer Science and Information.
CS210: Data Structures and Algorithms Course Guide Sarab Al Muhaideb Prince Sultan University, College for Women.
Course Guide Lines CS210: Data Structures and Algorithms Course Guide Layal Kazma Prince Sultan University, College for Women.
CMSC 2021 CMSC 202 Computer Science II for Majors Fall 2002 Mr. Frey (0101 – 0104) Mr. Raouf (0201 – 0204)
1 Object-Oriented Programming Using C++ CLASS 1. 2 Review of Syllabus Catalog Description –An introduction to object oriented programming techniques using.
1 Chapter Structured Types, Data Abstraction and Classes Dale/Weems.
ECE 264 Object-Oriented Software Development Instructor: Dr. Honggang Fall 2012 Lecture 8: File I/O; Introduction to classes.
CPS120: Introduction to Computer Science Winter 2002 Instructor: Paul J. Millis.
Introduction to ECE 2401 Data Structure Fall 2005 Chapter 0 Chen, Chang-Sheng
CS151: Digital Design Course Guide Sarab Al Muhaideb Prince Sultan University, College for Women.
Welcome to the MTLC MATH 115 Spring MTLC Information  Hours of Operation  Sunday:4:00pm – 10:00pm  Monday – Thursday: 8:00am – 10:00pm  Friday:8:00am.
Chapter 4 Introduction to Classes, Objects, Methods and strings
ICS202 Data Structures King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science Department.
ECE 264 Object-Oriented Software Development Instructor: Dr. Honggang Wang Fall 2012 Lecture 9: Continuing with classes.
EGR 2261 Unit 11 Classes and Data Abstraction  Read Malik, Chapter 10.  Homework #11 and Lab #11 due next week.  Quiz next week.
1 CS 311 Data Structures. 2 Instructor Name : Vana Doufexi Office : 2-229, Ford Building Office hours: By appointment.
CMSC 2021 CMSC 202 Computer Science II for Majors Spring 2002 Sections Ms. Susan Mitchell.
CMSC 2021 CMSC 202 Computer Science II for Majors Spring 2001 Sections Ms. Susan Mitchell.
CMSC 2021 CMSC 202 Computer Science II for Majors Spring 2003 Mr. Frey (0101 – 0104) Mr. Raouf (0201 – 0204)
1 CMSC 202 ADTs and C++ Classes. 2 Announcements Project 1 due Sunday February 25 th at midnight – don’t be late! Notes and clarifications for Project.
1 Classes II Chapter 7 2 Introduction Continued study of –classes –data abstraction Prepare for operator overloading in next chapter Work with strings.
CS151 Introduction to Digital Design Noura Alhakbani Prince Sultan University, College for Women.
February 28, 2005 Introduction to Classes. Object Oriented Programming An object is a software bundle of related variables and methods. Software objects.
Slide 1 Chapter 6 Structures and Classes. Slide 2 Learning Objectives  Structures  Structure types  Structures as function arguments  Initializing.
Data Structures and Algorithms in Java AlaaEddin 2012.
Course Information CSE 2031 Fall Instructor U. T. Nguyen /new-yen/ Office: CSEB Office hours:  Tuesday,
CS 367 Introduction to Data Structures Charles N. Fischer Fall s367.html.
1 Data Structures CSCI 132, Spring 2014 Lecture 2 Classes and Abstract Data Types Read Ch Read Style Guide (see course webpage)
CPSC 252 ADTs and C++ Classes Page 1 Abstract data types (ADTs) An abstract data type is a user-defined data type that has: private data hidden inside.
CMPT 238 Data Structures Instructor: Tina Tian. General Information Office: RLC 203A Office Hour: Tue and Fri 12:30 - 2:00PM.
1 Welcome Alireza Humber College Lecture 1 Game 540 Alireza
1 Classes and Data Abstraction Chapter What a Class ! ! Specification and implementation Private and public elements Declaring classes data and.
Data Structures Lecture 4: Classes in C++ Azhar Maqsood NUST Institute of Information Technology (NIIT)
1 Chapter 12 Classes and Abstraction. 2 Chapter 12 Topics Meaning of an Abstract Data Type Declaring and Using a class Data Type Using Separate Specification.
CS140 – Computer Programming 1 Course Overview First Semester – Fall /1438 – 2016/2017 CS140 - Computer Programming 11.
Chapter 12 Classes and Abstraction
Computer Engineering Department Islamic University of Gaza
CS101 Computer Programming I
CSc 1302 Principles of Computer Science II
CSc 020: Programming Concepts and Methodology II
22446: Microprocessors Introduction
Chapter 3: Using Methods, Classes, and Objects
More about OOP and ADTs Classes
Computer Science 102 Data Structures CSCI-UA
CS148 Introduction to Programming II
Classes and Data Abstraction
More about OOP and ADTs Classes
First Semester 1439/1440 Welcome 
Orientation CSC 111.
Computer Engineering Department Islamic University of Gaza
Administrative Issues
EECE.3220 Data Structures Instructor: Dr. Michael Geiger Spring 2019
Presentation transcript:

CS 210 DATA STRUCTURES AND ALGORITHIMS Fall 2006

CS 210 Instructor Mrs. Sarab Almuhaideb. Office: W357 Phone: Ext.# Office Hours: SUN 12:00 – 1:00, MON 9:00 – 10:50, (or by appointment)

CS 210 CS 210 : Data Structures and Algorithms. Credit Hours: 3. Prerequisite: CS 102. Course Home Page: Visit to find course announcements, notes, important dates,assignments, grades and more.

CS 210 Abstract Data Types ADT: is the study of classes of objects whose logical behavior is defined by a set of values and a set of operations.

CS 210 Data Structures The term Data Structures refers to the study of data and how to present objects within a program; that is, the implementation of the structured relationships. We are now interested in the study of the abstract properties of classes of data objects in addition to how the objects might be represented in a program.

CS 210 It is well known that data structures have a profound effect on the performance of programs and applications. The main purpose of this course is to introduce the main types of data structures and illustrate their use throughout simple examples and applications. In the process, some guidelines and principles for good programming and application development are given. Course Objectives

CS 210 Text Book ADT, Data Structures and Problem Solving with C++, 2 nd Edition. By Larry Nyhoff, Prentice Hall, 2004.

CS 210 Evaluation Grading: Major 1 20%. Major 2 20%. Assignments 15%. Quizzes10%. Final35%. No make-up exams.

CS 210 Important Dates Major I Exam: Monday November 8, 2006 [8-10]. Major II Exam: Monday December 11, 2006 [8-10]. Quizzes: Quiz 1: Sunday October 1, Quiz 2: Sunday November 19, Quiz 3: Sunday December 3, Final Exam: During the period Jan 20 – 30, 2007.

CS 210 Course Policy 1. There will be weekly tutorial problems as well as bi-weekly programming projects. 2. Students are encouraged to solve the tutorial problems before we do them together in class, but are NOT required to submit their solutions % of your grade will be assigned to PROGRAMMING projects. 4. Homework assignments must be done individually( or in pairs as stated in the project ’ s requirements). 5. We do not expect to see two programming projects that look identical. In this case, BOTH projects will be rejected. 6. Please note the due date for your programming project. 7. Late projects will be grade-penalizes or might not be accepted at all. 8. This course adopts the drop-the-lowest policy for assignments and quizzes. 9. All source files must be compiled and fully tested by the student before submission. 10. A program that does not compile is not accepted for any reason. 11. Also, a program with no output is not accepted. 12. A program must be submitted in both electronic copy (the.cpp file) and hard copy. 13. Make sure the floppy is labeled with your name and the assignment number. 14. If a student was absent in any lecture, then she is expected to read the lecture material and is welcomed for any specific question she may has.

CS 210 Data Structures Revision: Classes and Abstract Data Types Please read notes page for details.

CS 210 Abstraction  Captures essential qualities of an object and names the object.  Ignores implementation details  Is necessary for managing large, complex software projects.

CS 210 Data Hiding  Hides implementation details from user  Prevents user from accessing implementation directly  User must interact with object through an interface.

CS 210 Hierarchical Design- an Example CIS Carnet Order Lab Order Radiology Order Appointment Documen- tation Lab Gen. LabAPMicroBB SchedulingRadiology CT ScanX-RayMRIUltrasound Patient Registration

CS 210 Classes in C++  A class is a means of abstraction in C++  A class is a specification of a group of objects that all have the same essential properties and behaviors. FOR EXAMPLE...

CS 210 A class example class Student Properties (data members) name, graduation year, list of courses, number of courses Operations (methods) List Courses List Student Information Add a Course Set Graduation Date

CS 210 C++ Data Type class represents an ADT  2 kinds of class members: Data members and function members  Class members are private by default  Data members are generally private  Function members are generally declared public  Private class members can be accessed only by the class member functions (and friend functions), not by client code.

CS 210 class type declaration The class declaration creates a data type and names the members of the class. It does not allocate memory for any variables of that type! Client code still needs to declare class variables.

CS 210 An object is an instance of a class For example: object studentA Name: Andrea Student Graduation Year: 2005 List of Courses: CSCI262, MATH331 Number of courses: 6

CS separate files generally used for class type // SPECIFICATION FILE ( student.h ) // Specifies the data and function members. class Student { public:... private:... } ; // IMPLEMENTATION FILE (student.cpp ) // Implements the Student member functions....

CS 210 Class Student Specification // SPECIFICATION FILE( student.h ) typedef char string9[10]; class Student// declares a class data type {// does not allocate memory public : // 5 public function members void AddCourse(string9 CourseName); void ListCourses(void) const; void ListInfo(void) const; void SetGradDate(int year); Student();// Constructor Function private :// 4 private data members char studentName[30]; string9 courses[6]; int numCourses; int gradDate; } ;

CS 210 Implementation file for Student // IMPLEMENTATION FILE ( student.cpp ) // Implements the Student member functions. #include “ student.h ” // also must appear in client code #include... void Student :: SetGradDate (int year ) { gradDate = year; }...

CS 210 Class Constructors initialize Data Members // In the file student.cpp Student :: Student () {//Default Constructor numCourses = 0; gradDate = 0; strcpy(studentName, “ John Doe ” ); } // This is invoked in client code at time of object declaration: // Student newStudent( “ Mary Contrary ”, 2010); Student :: Student(char name[ ], int year) {//Constructor with parameters //We will fill this out in class! }

CS 210 Use of C++ data type class  Facilitates re-use of C++ code for an ADT.  Software that uses the class is called a client.  Variables of the class type are called objects or instances of the class.  Client code uses public member functions to handle its class objects.  Private members cannot be directly accessed by client code. It can only be accessed by member functions.

CS 210 #include “ student.h ” // includes specification of the class #include int main ( void ) { int newYear; string9 newCourse; Student newStudent;// create new Student object cout << “ Enter graduation year: “ ; cin >> newYear; newStudent.SetGradDate(newYear); // set Graduation date cout << “ Enter course to be added: “ ; cin >> newCourse; newStudent.AddCourse(newCourse); // Add a course newStudent.ListInfo(); // List Student information newStudent.ListCourses(); // List courses } // end of main Client Code Using Student