Posts

Showing posts from October, 2020

A food court facilitates their customers with a featured App where the customers can view the Menu Card and place their order. The order may be delivered on-premises or off-premises as per policies. Write a code to take the order from the customer by pressing menu number & Quantity. Final Output should be the calculated total amount.

Image
 A food  court facilitates their customers with a featured App where the customers can view the Menu Card and place their order. The order may be delivered on-premises or off-premises as per policies. Write a code to take the order from the customer by pressing menu number & Quantity. Final Output should be the calculated total amount. Menu card is given as: OUTPUT FOR THE PROGRAM Number Name                                            Price 1               Veg Sandwich                                     80      2               Cheese  Sandwich                              130 3                Veg Grilled  Sandwich                    100 4                  Sada Dosa                                           80 5                  Masala Dosa                                      90 6                  Onion Rava Sada Dosa                  110 7                  Onion Rava Masala Dosa              120 8                  Spring Dosa                                          140 9     

Michael has a beautiful house. There is only one staircase to reach his bedroom. He used to climb either 1 stair or 2 stairs at a time. If we consider all possible combinations of climbing, in how many ways can Michael reach to the top?

Image
Michael has a beautiful house. There is only one staircase to reach his bedroom. He used to climb either 1 stair or 2 stairs at a time. If we consider all possible combinations of climbing, in how many ways can Michael reach to the top? OUTPUT FOR THE PROGRAM #include<iostream> using namespace std; int Stairs,Sum;   int main() {    cout<<"Enter Number of Stairs: ";    cin>>Stairs;    if(Stairs>20)     {     cout<<"Wrong Infrastructure";     }    else     {     if(Stairs%2)     {     Sum=Stairs + (Stairs+1)/2;     cout<<"Total Possible ways are: "<<Sum; } else { Sum=Stairs + (Stairs)/2;     cout<<"Total Possible ways are: "<<Sum; }     } return 0; } /* ****************************Output***************** Enter Number of Stairs: 20 Total Possible ways are: 30 */ For more such posts click the link:- http://svencrai.com/G8W

Create employee bio-data using following classes i) Personal record ii)Professional record iii)Academic record Assume appropriate data members and member function to accept required data & print bio-data. Create bio-data using multiple inheritance using C++.

Image
 Create employee bio-data using following classes i) Personal record ii)Professional record iii)Academic record  Assume appropriate data members and member function to accept required data & print bio-data. Create bio-data using multiple inheritance using C++. OUTPUT OF THE PROGRAM #include<iostream> #include<iomanip> using namespace std; class personal {   protected:           char name[10],add[10],dob[10];           int mob;           char bg[5],gender[6];     public:           void getdata()           {               cout<<"Enter your Name :";               cin>>name;               cout<<"Enter your Current Address :";               cin>>add;               cout<<"Enter your Mobile No. :";               cin>>mob;               cout<<"Enter your Date of Birth :";               cin>>dob;               cout<<"Enter your Blood group :";               cin>>bg;    

Develop an object oriented program in C++ to create a database of student information system containing the following information: Name, Roll number, Class, division, Date of Birth, Blood group, Contact address, telephone number, driving license no. etc Construct the database with suitable member functions for initializing and destroying the data viz constructor, default constructor, Copy constructor, destructor, static member functions, friend class, this pointer, inline code and dynamic memory allocation operators-new and delete.

Image
 Develop an object oriented program in C++ to create a database of student information system containing the following information: Name, Roll number, Class, division, Date of Birth, Blood group, Contact address, telephone number, driving license no. etc Construct the database with suitable member functions for initializing and destroying the data viz constructor, default constructor, Copy constructor, destructor, static member functions, friend class, this pointer, inline code and dynamic memory allocation operators-new and delete. OUTPUT FOR THE PROGRAM #include<iostream> #include<iomanip> #include<cstring> using namespace std; class personal { char bg[5],name[20],dob[10]; char Class[5],div[5]; float height,weight; int ins_pno,roll; char cadd[20]; char ph_no[20]; int dlno; static int cnt; public: friend class derived; personal() { strcpy(name,"Deepika"); roll=24; strcpy(Class,"SE"); strcpy(div,"A");