-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from aayush105/all-readme
feat: add readme file for all the folder in oop programs
- Loading branch information
Showing
9 changed files
with
71 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,26 @@ | ||
- [ ] [q1](q1.cpp): WAP to access public data from main function. | ||
- [ ] [q2](q2.cpp): WAP to access the data from the function outside the class. | ||
- [ ] [q3](q3.cpp): WAP to access the data from the function inside the class. | ||
- [ ] [q4](q4.cpp): Create a class named "Animal" with data and methods as follows: | ||
- Data: name, id_number, cost; | ||
- Methods: void setdata(char, int, float) and void showdata() | ||
- Create two different objects of type "Animals" and use setdata() to set the data member values and use showdata() to display them. | ||
- [ ] [q5](q5.cpp): WAP to create a class student. Ask user to enter name and marks obtained in 5 different subjects. The program should print the name and total marks obtained by students. | ||
- [ ] [q6](q6.cpp): WAP to show different type of constructor (default, parameterized and copy) and destructor. | ||
- [ ] [q7](q7.cpp): Explain all constructor with and display appropriate message when object goes out of scope. | ||
- [ ] [q8](q8.cpp): Create a class named "Rectangle" with two data members-length and breadth and a function to calculate the are which is length x breath. The class has three constructor which are: - having no parameter: values of both length and breadth are assigned zero. - having two numbers as parameters: the two numbers are assigned as length and breadth respectively. - having one number as parameter: both length and breadth are assigned that number. Now crate objects of "Rectangle" class having none, one and two parameters and print their areas using member function area. | ||
- [ ] [q9](q9.cpp): WAP to prnit the name of students by creating a student class. If no name is passed while creating and object of the student clas, then the name should be "unknown" otherwise the name should be equal to the string value passed while creating object of the student class. | ||
- [ ] [q10](q10.cpp): WAP to show how friend function works. | ||
- [ ] [q11](q11.cpp): Expxlain friend class with exampel. | ||
- [x] [q12](q12.cpp): WAP to create classes ABC with data member feet and XYZ with data member inch. Add members of class ABC and XYZ using friend function. | ||
- [x] [q13](q13.cpp): WAP to add distances D1(feet,inch) and D2(feet,inch). Display result by returning values using friend function. | ||
- [ ] [q14](q14.cpp): WAP to show passing single argument as an object. | ||
- [ ] [q15](q15.cpp): WAP to show returnign object by normal way and also with nameless object. | ||
- [ ] [q16](q16.cpp): WAP to add two complex numbers using memer function add(). Pass single argument to function, return from function and display result. | ||
- [ ] [q17](q17.cpp): WAP to add distances D1(feet, inch) and D2(feet, inch). Dipslay result by returning values with nameless object. | ||
- [ ] [q18](q18.cpp): WAP to add distances D1(feet, inch) and D2(feet, inch). Display result inside function. | ||
- [ ] [q19](q19.cpp): WAP to swap the numbers by using reference variable. | ||
- [ ] [q20](q20.cpp): WAP to show static variable and static function. | ||
- [ ] [q21](q21.cpp): WAP to show the order of creation and destruction using static data members. There must be static keyword in your program to display the value of static data. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
- [ ] [q1](q1.cpp): WAP to show simple try catch throw. | ||
- [ ] [q2](q2.cpp): WAP to show throwing inside function. | ||
- [ ] [q3](q3.cpp): WAP to show multiple catch statements. | ||
- [ ] [q4](q4.cpp): WAP to show catching all exceptions. | ||
- [ ] [q5](q5.cpp): WAP to show specifying exceptions. | ||
- [ ] [q6](q6.cpp): WAP to show rethrowing exception. | ||
- [ ] [q7](q7.cpp): WAP to show try catch throw in user define classes type. | ||
- [x] [q8](q8.cpp): WAP to compute square root of a number. The input value must be tested for validity. If it is negative an exception must be raised. | ||
- [x] [q9](q9.cpp): WAP to read name, roll number and marks that catches multiple exceptions using exception class if roll number is negative and marks greater than full marks. | ||
|
||
- [ ] [q10](q10.cpp): WAP to show how do you throw only specified excepton from a function. | ||
- [ ] [q11](q11.cpp): WAP to throw multiple exception. Using exception class and each exception is handled by separate handler. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## Important | ||
|
||
- [ ] [q1](q1.cpp): Create a class called cricketer with member variables to represent name, age, and number of matches played. From this derive two classes Bowler and Batsmen. Bowler class has number of wickets as member variable and Batsmen class has number of runs and centuries as member variables. Use appropriate member functions in all classes to read and display respective data. | ||
- [ ] [q2](q2.cpp): all classes to read and display respective data. | ||
Create a class student with data members studen ID and name. Create class internal exam with marks first as data member and external exam with marks second. Create class result by inheriting class internal exam and external exam that will add marks of class internal exam and external exam. | ||
- [ ] [q3](q3.cpp): WAP to show order of constructor(default, parameterized) and destructor call in multiple inheritance. Base class one ename and class two have employee id and child class result. | ||
- [ ] [q4](q4.cpp): WAP to convert object from class that represent weight of gold in Nepal, tola to object of a class that represent internal gold measurement of weight in gram scale. | ||
- [ ] [q5](q5.cpp): WAP with three classes students, test, and result by using multi level inheritance. Assume necessary member and function yourself and program with input information input data and calculate marks total and display result. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Multilevel Inheritance | ||
|
||
- [ ] [q1](Multilevel Inheritance/q1.cpp): WAP to show multi level inheritance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Multipath Inheritance | ||
|
||
- [ ] [q1](Multipath Inheritance/q1.cpp): WAP to show multi path inheritance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## Multipe Inheritance | ||
- [ ] [q1](Multiple Inheritance/q1.cpp): WAP to show multiple inheritance constructor and destructor. | ||
- [ ] [q2](Multiple Inheritance/q2.cpp): WAP to show multiple inheritance with different function name. | ||
- [ ] [q3](Multiple Inheritance/q3.cpp): WAP to show the ambiguity in multiple inheritance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
## Single Inheritance | ||
- [x] [q1](Single\ Inheritance/q1.cpp): WAP to show single inheritance with default constructor. | ||
- [x] [q1](Single Inheritance/q1.cpp): WAP to show single inheritance with default constructor. | ||
- [ ] [q2](Single Inheritance/q2.cpp): WAP to show single inheritance with main function access. | ||
- [ ] [q3](Single Inheritance/q3.cpp): WAP to show single inheritance parameterize constructor. | ||
- [ ] [q4](Single Inheritance/q4.cpp): WAP to show single inheritance parameterized only in child class. | ||
- [ ] [q5](Single Inheritance/q5.cpp): WAP to show single inheritance with same function name of base and derived class. | ||
- [ ] [q6](Single Inheritance/q6.cpp): WAP to show parent function call inside child class. | ||
- [ ] [q7](Single Inheritance/q7.cpp): WAP to show protected data inside base class. | ||
- [ ] [q8](Single Inheritance/q8.cpp): WAP to shw parent function call inside child class having same member function name. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
- [ ] [q1](q1.cpp): WAP to show virtual function mechanism. | ||
- [ ] [q2](q2.cpp): WAP to show pure virtual function mechanism and abstract class. | ||
- [ ] [q3](q3.cpp): WAP to show virtual destructor. | ||
- [ ] [q4](q4.cpp): WAP to show dynamic cast operator. | ||
- [ ] [q5](q5.cpp): WAP to show type id operator. | ||
- [ ] [q6](q6.cpp): A bookshop in Kathmandu valley sells books and DVD. Two classes Book and DVD are inherited from the astract base class Media. The Media class has common data members such as title and publication. The class Book has data members such as number_of_pages and that of DVD has data member such as duration. Each class members has member functions such as read data() and showdata(). WAP for modeling the class hierarchy for book shop and process objects of these classes using pointers to the base class. | ||
- [x] [q7](q7.cpp): Design a class that represents paper. Create class book, newspaper, copy derived from class paper. Add necessary member function to make your program meaningful and also show constructor and virtual destructor. Create object Dynamically using pointer to the base class. | ||
|