Hi there,
This is the first participation in this site, & I want to help me
would you mind answering this questions, pleeeeeease:icon_cry:
========
((1))
Write a C++ program that do the following:
a.Define a class called Calculator.
b.Declare the object Cal of type Calculator.
c.Define a member function Display_sum that receive two parameters Number1 and Number2 then print the sum of these two numbers.
d.Define a member function Display_multiply that receive two parameters Number1 and Number2 then print the multiplication of these two numbers.
e.Test your function.
========
((2))
Write a C++ program that do the following:
a.Define a class called HotelRoom.
b.Declare Room1002 as an object of HotelRoom.
c.Define a member function called ShowRoomInfo to print room_number, floor_number and type that receive as parameters.
d.Define a member function called CheckRoomStatus to check the availability of a room according to the value of its integer parameters .If it is 1-> booked, 0->not booked.
e.Test your function.
========
((3))
Write a C++ program that do the following:
a.Define a class called Date.
b.Declare Birth_Date as an object of Date.
c.Define a member function called PrintInfo to print the Day, Month and Year values in the format 01-01-2000 that receive as parameters.
d.Define a member function called Calculate_age that calculates the difference between your birth date (receive its information as arguments) and the current date that read from the user .The result will be as a number of days.
e.Test your function.
========
((4))
Write a C++ program that do the following:
a.Define a class called Rectangle:
b.Declare Rec as an object of Rectangle.
c.Define a member function called perimeter that calculates and prints rectangle’s perimeter .Receive rectangle’s length and width as parameters.
(Note: perimeter= 2* (length+width).
d.Define a member function called area that calculates and prints rectangle’s area. Receive rectangle’s length and width as parameters
(Note: area= length*width).
e.Test your function.
========
((5))
Write a C++ program that read two strings and do the following:
•Print the length of each string.
•Print the largest string.
•Compare the two strings and print the first one alphabetically.
•Compare the first three characters of the first string with the second string and prints the first one alphabetically.
•Copy the first string into the second string.
•Copy the first four characters from the second string to the first string.
•Copy the first string to the end of second string.
•Copy the first two characters from the second string to the end of first string.
•Print the address of the first occurrence of ‘a’ in the first string.
•Print the address of the last occurrence of ‘a’ in the second string.
•Print the address of the first occurrence of “abc” in the first string;