Platinum Partner

MemberFunc.cpp

#include 
#include 
#include 

using namespace std;

class classa
{
      private:
              float y,y0;
              
      public:
             void sety(float y);
             float gety(){return y0;};    
};

             void classa::sety (float y){y0 = y;};


class computer
{
      private:
              string os, machineOS;
              float speed, machinespeed;
              int memory, machinememory;
              bool bluetooth, machineBT;
              string color, machinecolor;
              
      public:
             void setos(string os);
             void setspeed(float speed);
             void setmemory(int memory);
             void setbluetooth(bool bluetooth);
             void setcolor(string color);
             
             string getos(){return machineOS;};
             float getspeed(){return machinespeed;};
             int getmemory(){return machinememory;};
             bool getbluetooth(){return machineBT;};
             string getcolor(){return machinecolor;};
};

             void computer::setos(string os){machineOS = os;};
             void computer::setspeed(float speed){machinespeed = speed;};
             void computer::setmemory(int memory){machinememory = memory;};
             void computer::setbluetooth(bool bluetooth){machineBT = bluetooth;};
             void computer::setcolor(string color){machinecolor = color;};
  
main()
{
      
/* INHERITANCE: PART I */

    int i;
    char tmp[100];
    cout << endl;
    char ar[] = "-[ OK ]- TESTING: We Set the Y-Value using Inheritance ";
    strncpy(tmp,ar,100);
    for(i=0;i> Choice;
         switch (Choice)
         {
         case 1: cout << "We do NOT have such systems anymore in our inventory"; getchar(); break;
         case 2: cout << "How about FreeBSD? Rumor has it that it is stable!"; getchar(); break;
         case 3: cout << "The Total is $5,000. Have a great day, come again!"; getchar(); break;
         default:       
              cout << "Sorry, '" << Choice << "' does not correspond to a valid Choice. Nice try!\n\n";
              getchar();
         }
         
      getchar();
      return 0;
}
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}