lecture 4 advanced C++ programming
lecture 4 advanced C++ programming
➢The concept of OOP isn’t related to the specific programming language (Pl).
➢Several programming language supports the programming paradigm OOP, such as Java
and C#.
➢The programming paradigm is one of the styles of programming that is used to develop
software systems.
➢In the object-oriented paradigm, a template for a collection of objects is called a class.
Object-Oriented Programming (OOP) كلية تكنولوجيا الصناعة والطاقة
Course
Teacher Section Hall
Example: كلية تكنولوجيا الصناعة والطاقة
Data Functions ()
1-Student-name 1- change-study-level()
2-Address 2- print-student-name()
3-GPA 3-print-student-
4-ID address()
5- Study-level 4- modify-GPA()
كلية تكنولوجيا الصناعة والطاقة
Product
Data
Functions ()
1-product name
1- Discount
2-Product-code
2- Print-Product name()
3-Price
3-Print-product-price()
4-Discount rate
4- modify-price()
5-Producer
كلية تكنولوجيا الصناعة والطاقة
Example:
Implement a simple C++ program using the following steps :
1)Define a class GradeBook with a member function displayMessage.
This function prints a message on the screen "welcome to the grade-
book program".
2)Create a GradeBook object named myGradeBook and call its member
function in the main function of the program.
كلية تكنولوجيا الصناعة والطاقة
كلية تكنولوجيا الصناعة والطاقة
كلية تكنولوجيا الصناعة والطاقة
Example كلية تكنولوجيا الصناعة والطاقة
كلية تكنولوجيا الصناعة والطاقة
Class Declarations
كلية تكنولوجيا الصناعة والطاقة
كلية تكنولوجيا الصناعة والطاقة
كلية تكنولوجيا الصناعة والطاقة
كلية تكنولوجيا الصناعة والطاقة
Outputs
Task 2:
1- Select a real world problem, Then explain this problem
2-Explain the difference between Object-Oriented Programming (OOP) and programming languages (PL) to
solve this problem using a computer
3-Illustrate the fundamental difference between Procedural Programming and Object-Oriented Programming
paradigms to solve the selected real world problem
4-List the main steps to develop the system of the selected real-world problem by using the OOP paradigm.
Your developed OOP system for selected real world problem should include the following steps
a- Build a class with a member function in a C++ programming language, then create an object and call its
member function in the main function.
b-Implement a constructor, destructor, overloading methods, and static data member in the C++
programming language.
C- Develop number (4.a) to create a class in a separate file using Microsoft Visual Studio C++. Then
Evaluate the significant of placing this class in a separate file.
كلية تكنولوجيا الصناعة والطاقة
In this week's lab, you’ll Apply
Thank
q
you