Maltepe Üniversitesi Bilgisayar Mühendisliği Bölümü BİL 203 Veri Yapıları ve Algoritmalar I GENEL DERS BİLGİLERİ Öğretim Elemanı : İzzet TAMER Ofis : MUH 311 Ofis Saatleri : Pazartesi: 14:10 15:00, Salı: 15:10 16:00, Çarşamba: 11:10 12:00 14:10 15:00, Perşembe: 11:10 13:00 Telefon : 0216 626 10 50 / PBX: 1408 E-Posta : mailto:izzettamer@maltepe.edu.tr Sınıf : 308-314 Lab2 Ders Saatleri : Bilgisayar Mühendisliği: Pazartesi: 11:10 12:00, Salı: 11:10 12:00, Çarşamba: 15:10 16:00, Perşembe: 13:10 15:00 Ders Kitabı : C++ Programming (3 rd ed, Thomson), D. S. MALIK 1
Ders İçeriği 1. Hafta: Records (structs) Accessing struct Members Assignment Comparison (Relational Operators) Input / Output Struct Variables and Functions Arrays versus structs Arrays in structs Structs in Arrays Structs within a struct EXAMPLE: Sales Data Analysis (Page 569) Homework 1: Pop Quiz 1: 2. Hafta: Classes Unified Modeling Language Class Diagrams Variable Declaration Accessing Class Members Built in Operations on Classes Assignment Operator and Classes Class Scope Functions and Classes Reference Parameters and Class Objects Implementation of Member Functions Accessor and Mutator Functions Order of public and private Members of a Class Constructors Invoking a Constructor 2
Invoking the Default Constructor Invoking a Constructor with Parameters Homework 2: Pop Quiz 2: 3. Hafta: Constructors and Default Parameters Classes and Constructors: A Precaution Arrays of Class Object and Constructors Destructors Data Abstraction, Classes and Abstract Data Types A Struct Versus a Class Information Hiding Executable Code Static Members of a Class EXAMPLE: Candy Machine (Page 642) Homework 3: Pop Quiz 3: 4. Hafta: Inheritance Redefining Member Functions of the Base Class Constructors of Derived and Base Classes Header File of a Derived Class Multiple Inclusion of a Header File C++ Stream Classes Protected Members of a Class Inheritance as public, protected, private Composition OOD and OOP 3
Identifying Classes, Objects and Operations EXAMPLE: Grade Report (Page 701) Homework 4: Quiz 1: 5. Hafta: Pointer Data Type and Pointer Variables Declaring Pointer Variables Address of Operator Dereferencing Operator Classes, Structs and Pointer Variables Initializing Pointer Variables Dynamic Variables Operator New Operator Delete Operations on Pointer Variables Dynamic Arrays Functions and Pointers Pointers and Function Return Values Dynamic Two Dimensional Arrays Homework 5: Pop Quiz 4: 6. Hafta: Midterm Questions and Answers of Midterm Shallow Versus Deep Copy and Pointers Classes and Pointers Destructor Assignment Operator 4
Copy Constructor Homework 6: 7. Hafta: Inheritance, Pointers and Virtual Functions Classes and Virtual Destructors Abstract Classes and Pure Virtual Functions Array Based List Unordered Lists Ordered Lists Address of Operator and Classes Homework 7: Pop Quiz 5: 8. Hafta: Why Operator Overloading is Needed Operator Overloading Syntax for Operator Functions Overloading an Operator Pointer this Friend Functions of Classes Definition of a friend Function Operator Functions as Member Functions and Nonmember Functions Overloading Binary Operators Overloading the Binary Operators as Member Functions Homework 8: Pop Quiz 6: 5
9. Hafta: General Syntax to Overload the Binary Operators as Member Functions Overloading the Binary Operators Nonmember Functions General Syntax to Overload then Binary Operators as Nonmember Functions Overloading the Stream Insertion and Extraction Operators Overloading the Stream Insertion Operator Overloading the Stream Extraction Operator Overloading the Assignment Operator General Syntax to Overload the Assignment Operator Overloading Unary Operators Overloading the Increment and Decrement Operators General Syntax to Overload the Pre Increment Operator ++ as a Member Function Homework 9: Pop Quiz 7: 10. Hafta: Overloading the Post Increment Operator Operator Overloading: Member Versus Nonmember Classes and Pointer Member Variables Operator Overloading: One Final Word EXAMPLE: Clock Type (Page 858) EXAMPLE: Complex Number (Page 866) Overloading the Array Index Operator Homework 10: Quiz 2: 11. Hafta: EXAMPLE: New String (Page 874) Function Overloading Templates 6
Function Templates Class Templates Array Based List Handling Exceptions within a Program C++ Mechanism of Exception Handling Try / Catch Block Order of Catch Blocks Homework 11: Pop Quiz 8: 12. Hafta: Using Try / Catch Blocks in a Program Using C++ Exception Classes Creating Your Own Exception Classes Rethrowing and Throwing an Exception Exception Handling Techniques Terminate the Program Fix the Error and Continue Log the Error and Continue Stack Unwinding Homework 12: Pop Quiz 9: 13. Hafta: Recursive Definitions Direct and Indirect Recursion Infinite Recursion Problem Solving Using Recursion EXAMPLE: Fibonacci Number (Page 954) EXAMPLE: Tower of Hanoi (Page 958) Homework 13: 7
14. Hafta: Tower of Hanoi: Analysis Recursion or Iteration EXAMPLE: Converting a Number form Binary to Decimal (Page 963) EXAMPLE: Converting a Number form Decimal to Binary (Page 968) General Repetition Student Projects Homework 14: Pop Quiz 10: YOKLAMA VE DERSE KATILIM Derslere katılmak zorunludur. Zamanında sınıfta olmalısınız. Derste sorular sormanız ve tartışmalara katılmanız beklenmektedir. Derse en az %70 (laboratuar %80) oranında katılmalısınız. Aksi halde dersten kalırsınız. (Sınavlara girme hakkınız olmayacaktır.) SINAVLAR 2 Vize ve Final olmak üzere üç yazılı sınav olacaktır. NOT DEĞERLENDİRMESİ Not değerlendirmesi aşağıdaki gibi olacaktır: Ara Sınav: % 20 [ara sınav] + % 20 [ara sınav] + % 28 Ödev + % 4 lab ve derse katılım + % 10 Proje + % 8 Quiz + % 10 Pop Quiz Final Sınavı: % 40 [final sınavı] + % 28 ev ödevi + % 4 lab ve derse katılım + % 10 Proje + % 8 Quiz + % 10 Pop Quiz 8