SlideShare a Scribd company logo
1 of 24
Page 1
Govt. Post Graduate College
Samanabad
Assignment # 01
Object Oriented Programming
Submitted To: Mam Iqra
Submitted By: Zohaib Arif
Roll no.: 6823
Semester: ῙῙ
Department of Information & Technology
(evening)
Page 2
Contents .
Program…………………………………………………………………………………………..Page no.
I. Display of “Word” for fivetimes……………………………………………………………............ 3
II. Display of five numbers and their sum……………………………………….……………………. 3
III. Display of counting…………………………………………………………………………….………….... 4
IV. Display of numbers and their squares…………………………………………………………...… 4
V. Inputting of number and display its table………………………………………..………….…… 5
VI. Distinguishing of even or odd numbers…………………………………………….………….….. 5
VII. Display of digits in block pattern…………………………………….………………………….….... 6
VIII. Display of symbolas a block..………………………………………………………………………….. 6
IX. Display of digits in descending order as triangle………………………………………………. 7
X. Display of digits in ascending order as triangle………………….…………………………….. 7
XI. Display of moredigits by changing firstdigit every time………………………………….. 8
XII. Initializing and display of digits fromarray…………………………………………………....... 8
XIII. Taking of number fromarray and displaying………………………………………………….... 9
XIV. Inputting storing in an array and displaying of numbers……………………………..…… 9
XV. Inputting the numbers and then store them in an array and display the sumand
averageof these numbers…………………..……………………………………………………..….. 10
XVI. Inputday and month and then calculates total number of days………………....…. 10
XVII. Inputvalue and find value using linear search……………………………………………….. 11
XVIII. Inputvalue and find value using binary search………………………………………………. 11
XIX. Inputfive values and sorts it using bubble sort…………………………………………….… 12
XX. Inputfive values and sorts it using selection sort…………………………………………... 12
XXI. Displays a massageusing function…………………………………………………….…………… 13
XXII. Inputnumbers in main function, passes thesenumbers to function and displays
maximum number………………………………………………………………………………….……… 14
XXIII. Inputa number in main function and passes and passes the number and function
display table……………………………………………………………………………………………….... 15
XXIV. Inputs a number and displays its processor and successor numbers using
function………………………………………………….……………………………………………………. 15
XXV. Create class with one integer data member and two member function……… 16
XXVI. Create class with three data member and three member function……………. 16
XXVII. Create two objects of class and input value for these objects and it displays detail of
costly book………………………………………………………………………………………………….. 17
Page 3
XXVIII. Create class has num& ch data members and one constructor with on parameter and
other with two parameter…………………………………………………………………………… 18
XXIX. Create class that has constructer and destructor………………………………………… 19
XXX. Create member function outside the class……………………………………………………20
XXXI. Create member function within the class…………………………………………………… 21
Page 4
Program # 01 : To Displayof “Word” for five times
Program # 02: To Displayof five numbers and their sum
Page 5
Program # 03: To Displayof counting
Program # 04: To Displayof numbers and their squares
Page 6
Program # 05: To Input a number and displayits table
Program # 06: To Distinguish of even or odd numbers
Page 7
Program # 07: To Displayof digitsin block pattern
Program # 08: To Displayof symbol as a block
Page 8
Program # 09: To Displaythe digits in descending order as triangle
Program # 10: To Displaythe digits in ascending order as triangle
Page 9
Program # 11: To Displaymore digits and changing of first digit every
time
Program # 12: To Initializingand display of digits from array
Page 10
Program # 13: To Take a number from an array and display
Program # 14: To Input a number and store it in an array and display
by using loop
Page 11
Program # 15: To Input the numbers and then store them in an array
and display the sum and average of these numbers
Program # 16: To Input day and month and then calculates total
number of days
Page 12
Program # 17: To Input value and find value using linear search
Program # 18: Input value and find value using binary search
Page 13
Program # 19:To input five values and sorts it using bubble sort
Page 14
Program # 20: To input five values and sorts it using selection sort
Page 15
Program # 21: To displays a massage using function
Program # 22: To input numbers in main function, passes these
numbers to function and displays maximumnumber
Page 16
Program # 23: To input a number in main function and passes and
passes the number and function display table
Program # 24: To inputs number and displays its processorand
successor number using function
Page 17
Program # 25:To declares a class with one integer data member and
two member function
Page 18
Program # 26:To make a class with three data member and three
member function
Page 19
Program # 27: To create two objects of class and input value for
these objects and it displays detail of costly book
Page 20
Program # 28:To make class has num & ch data members and one
constructor with on parameter and other with two parameter
Page 21
Program # 29:To create class that has constructer and destructor
Page 22
Program # 30:To create member function outside the class
Page 23
Program # 31:To create member function within the class
Page 24

More Related Content

Similar to programming

Thesis-aligned-sc13m055
Thesis-aligned-sc13m055Thesis-aligned-sc13m055
Thesis-aligned-sc13m055Mohan Kashyap
 
Introduction to Computer Under Process.pdf
Introduction to Computer Under Process.pdfIntroduction to Computer Under Process.pdf
Introduction to Computer Under Process.pdfMohamoud Saed Mohamed
 
Hostel management system srs
Hostel management system srsHostel management system srs
Hostel management system srshira akram
 
(Manual) auto cad 2000 visual lisp tutorial (autocad)
(Manual) auto cad 2000 visual lisp tutorial (autocad)(Manual) auto cad 2000 visual lisp tutorial (autocad)
(Manual) auto cad 2000 visual lisp tutorial (autocad)Ketut Swandana
 
Vic broquard c++ for computer science and engineering 2006
Vic broquard c++ for computer science and engineering 2006Vic broquard c++ for computer science and engineering 2006
Vic broquard c++ for computer science and engineering 2006Souvik Maity
 
Autocad map 3d tutorials
Autocad map 3d tutorialsAutocad map 3d tutorials
Autocad map 3d tutorialsJavier Morales
 
The Total Book Developing Solutions With EPiServer 4
The Total Book Developing Solutions With EPiServer 4The Total Book Developing Solutions With EPiServer 4
The Total Book Developing Solutions With EPiServer 4Martin Edenström MKSE.com
 
Getstart graphic
Getstart graphicGetstart graphic
Getstart graphicalldesign
 
FINAL_Tenorio_masters_thesis
FINAL_Tenorio_masters_thesisFINAL_Tenorio_masters_thesis
FINAL_Tenorio_masters_thesisLisa Tenorio
 
Example for SDS document in Software engineering
Example for SDS document in Software engineeringExample for SDS document in Software engineering
Example for SDS document in Software engineeringRavi Yasas
 

Similar to programming (20)

gp4
gp4gp4
gp4
 
Thesis-aligned-sc13m055
Thesis-aligned-sc13m055Thesis-aligned-sc13m055
Thesis-aligned-sc13m055
 
Introduction to Computer Under Process.pdf
Introduction to Computer Under Process.pdfIntroduction to Computer Under Process.pdf
Introduction to Computer Under Process.pdf
 
Hostel management system srs
Hostel management system srsHostel management system srs
Hostel management system srs
 
Thesis_Report
Thesis_ReportThesis_Report
Thesis_Report
 
Introduction to BIRT
Introduction to BIRTIntroduction to BIRT
Introduction to BIRT
 
C Programming
C ProgrammingC Programming
C Programming
 
Tokyo country
Tokyo countryTokyo country
Tokyo country
 
(Manual) auto cad 2000 visual lisp tutorial (autocad)
(Manual) auto cad 2000 visual lisp tutorial (autocad)(Manual) auto cad 2000 visual lisp tutorial (autocad)
(Manual) auto cad 2000 visual lisp tutorial (autocad)
 
Dynamics AX/ X++
Dynamics AX/ X++Dynamics AX/ X++
Dynamics AX/ X++
 
Hung_thesis
Hung_thesisHung_thesis
Hung_thesis
 
Vic broquard c++ for computer science and engineering 2006
Vic broquard c++ for computer science and engineering 2006Vic broquard c++ for computer science and engineering 2006
Vic broquard c++ for computer science and engineering 2006
 
Autocad map 3d tutorials
Autocad map 3d tutorialsAutocad map 3d tutorials
Autocad map 3d tutorials
 
The Total Book Developing Solutions With EPiServer 4
The Total Book Developing Solutions With EPiServer 4The Total Book Developing Solutions With EPiServer 4
The Total Book Developing Solutions With EPiServer 4
 
Getstart graphic
Getstart graphicGetstart graphic
Getstart graphic
 
FINAL_Tenorio_masters_thesis
FINAL_Tenorio_masters_thesisFINAL_Tenorio_masters_thesis
FINAL_Tenorio_masters_thesis
 
Dt
DtDt
Dt
 
DCI Survey 2014
DCI Survey 2014DCI Survey 2014
DCI Survey 2014
 
Example for SDS document in Software engineering
Example for SDS document in Software engineeringExample for SDS document in Software engineering
Example for SDS document in Software engineering
 
Vivarana fyp report
Vivarana fyp reportVivarana fyp report
Vivarana fyp report
 

Recently uploaded

EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 

Recently uploaded (20)

Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 

programming

  • 1. Page 1 Govt. Post Graduate College Samanabad Assignment # 01 Object Oriented Programming Submitted To: Mam Iqra Submitted By: Zohaib Arif Roll no.: 6823 Semester: ῙῙ Department of Information & Technology (evening)
  • 2. Page 2 Contents . Program…………………………………………………………………………………………..Page no. I. Display of “Word” for fivetimes……………………………………………………………............ 3 II. Display of five numbers and their sum……………………………………….……………………. 3 III. Display of counting…………………………………………………………………………….………….... 4 IV. Display of numbers and their squares…………………………………………………………...… 4 V. Inputting of number and display its table………………………………………..………….…… 5 VI. Distinguishing of even or odd numbers…………………………………………….………….….. 5 VII. Display of digits in block pattern…………………………………….………………………….….... 6 VIII. Display of symbolas a block..………………………………………………………………………….. 6 IX. Display of digits in descending order as triangle………………………………………………. 7 X. Display of digits in ascending order as triangle………………….…………………………….. 7 XI. Display of moredigits by changing firstdigit every time………………………………….. 8 XII. Initializing and display of digits fromarray…………………………………………………....... 8 XIII. Taking of number fromarray and displaying………………………………………………….... 9 XIV. Inputting storing in an array and displaying of numbers……………………………..…… 9 XV. Inputting the numbers and then store them in an array and display the sumand averageof these numbers…………………..……………………………………………………..….. 10 XVI. Inputday and month and then calculates total number of days………………....…. 10 XVII. Inputvalue and find value using linear search……………………………………………….. 11 XVIII. Inputvalue and find value using binary search………………………………………………. 11 XIX. Inputfive values and sorts it using bubble sort…………………………………………….… 12 XX. Inputfive values and sorts it using selection sort…………………………………………... 12 XXI. Displays a massageusing function…………………………………………………….…………… 13 XXII. Inputnumbers in main function, passes thesenumbers to function and displays maximum number………………………………………………………………………………….……… 14 XXIII. Inputa number in main function and passes and passes the number and function display table……………………………………………………………………………………………….... 15 XXIV. Inputs a number and displays its processor and successor numbers using function………………………………………………….……………………………………………………. 15 XXV. Create class with one integer data member and two member function……… 16 XXVI. Create class with three data member and three member function……………. 16 XXVII. Create two objects of class and input value for these objects and it displays detail of costly book………………………………………………………………………………………………….. 17
  • 3. Page 3 XXVIII. Create class has num& ch data members and one constructor with on parameter and other with two parameter…………………………………………………………………………… 18 XXIX. Create class that has constructer and destructor………………………………………… 19 XXX. Create member function outside the class……………………………………………………20 XXXI. Create member function within the class…………………………………………………… 21
  • 4. Page 4 Program # 01 : To Displayof “Word” for five times Program # 02: To Displayof five numbers and their sum
  • 5. Page 5 Program # 03: To Displayof counting Program # 04: To Displayof numbers and their squares
  • 6. Page 6 Program # 05: To Input a number and displayits table Program # 06: To Distinguish of even or odd numbers
  • 7. Page 7 Program # 07: To Displayof digitsin block pattern Program # 08: To Displayof symbol as a block
  • 8. Page 8 Program # 09: To Displaythe digits in descending order as triangle Program # 10: To Displaythe digits in ascending order as triangle
  • 9. Page 9 Program # 11: To Displaymore digits and changing of first digit every time Program # 12: To Initializingand display of digits from array
  • 10. Page 10 Program # 13: To Take a number from an array and display Program # 14: To Input a number and store it in an array and display by using loop
  • 11. Page 11 Program # 15: To Input the numbers and then store them in an array and display the sum and average of these numbers Program # 16: To Input day and month and then calculates total number of days
  • 12. Page 12 Program # 17: To Input value and find value using linear search Program # 18: Input value and find value using binary search
  • 13. Page 13 Program # 19:To input five values and sorts it using bubble sort
  • 14. Page 14 Program # 20: To input five values and sorts it using selection sort
  • 15. Page 15 Program # 21: To displays a massage using function Program # 22: To input numbers in main function, passes these numbers to function and displays maximumnumber
  • 16. Page 16 Program # 23: To input a number in main function and passes and passes the number and function display table Program # 24: To inputs number and displays its processorand successor number using function
  • 17. Page 17 Program # 25:To declares a class with one integer data member and two member function
  • 18. Page 18 Program # 26:To make a class with three data member and three member function
  • 19. Page 19 Program # 27: To create two objects of class and input value for these objects and it displays detail of costly book
  • 20. Page 20 Program # 28:To make class has num & ch data members and one constructor with on parameter and other with two parameter
  • 21. Page 21 Program # 29:To create class that has constructer and destructor
  • 22. Page 22 Program # 30:To create member function outside the class
  • 23. Page 23 Program # 31:To create member function within the class