| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Note: In class diagram + for public, - for private.
The class Person with private attributes name(string) and age(int).
The class contains three functions.
Person --- - Name: String - Age: int --- + Display() <constructor> + Person() <constructor> + Person(a: int)
Construct a class to hold personnel records class name is Records. Use the following data members, and keep them private:
string name; float salary; string date_of_birth;
Create two constructors, one to initialize the record with its necessary values and one default.
Create member functions to alter the individual’s name, salary, and date of birth.
Create two objects use one object to refer member function through pointer and other object will be accessing through dot operator.
Write a class Account that represents your bank account.
Write C++ header file Triangle.h with class Triangle with data members and member functions as per following class diagram. In Triangle.h file only implement get and set methods. (Consider right angle Triangle)
Triangle --- - Height: double - Base: double --- <<constructor>> + Triangle(double, double) <<destructor>> +~ Triangle() # +~ stands for destructor + getHeight(): double + setHeight(double) + getBase(): double + setBase(double) + getArea(): double + getPerimeter(): double
Write C++ program to include header file Triangle.h in your program. Implement constructor (with default value for height and width will be 0), getArea() and getPerimeter() member functions of Class Triangle and write menu driven program to get Height and Width details, display measurement (Area and Perimeter) of Triangle object.
| Back | FazBrowse Home | New Git URL |