Advertisement
Guest User

MariqnKST

a guest
Nov 18th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.97 KB | None | 0 0
  1. // MariqnKST.cpp : Defines the entry point for the console application.
  2. #include <iostream>
  3. #include <string>
  4. #include <vector>
  5.  
  6. using namespace std;
  7.  
  8. class CLaptop{
  9. protected:
  10.     string m_strProducer;
  11.     int m_iScreenSize;
  12.  
  13. public:
  14.     CLaptop(){
  15.         m_strProducer = "Dell";
  16.         m_iScreenSize = 12;
  17.     }
  18.  
  19.     CLaptop(string m_strProducer1, int m_iScreenSize1){
  20.    
  21.         m_strProducer = m_strProducer1;
  22.         m_iScreenSize = m_iScreenSize1;
  23.  
  24.     }
  25.  
  26.     CLaptop( int m_iScreenSize2){
  27.  
  28.         m_iScreenSize = m_iScreenSize2;
  29.  
  30.     }
  31.  
  32.     CLaptop(const CLaptop& COPY){
  33.    
  34.         m_strProducer = COPY.m_strProducer;
  35.         m_iScreenSize = COPY.m_iScreenSize;
  36.  
  37.     }
  38.  
  39.     string Getm_strProducer3()const{ return m_strProducer; }
  40.     int Geti_iScreenSize3()const{ return m_iScreenSize; }
  41.  
  42.     ostream& output(ostream& output){
  43.         output << "Producer: " << m_strProducer << "," << "Screen Size" << m_iScreenSize;
  44.     }
  45.  
  46.     istream& input(istream& input, CLaptop &Lap){
  47.         input >> Lap.m_strProducer >> Lap.m_iScreenSize;
  48.     }
  49.    
  50.     bool operator=(CLaptop& L){
  51.  
  52.     }
  53.  
  54.     bool operator<(CLaptop& First){
  55.         if (this->m_iScreenSize < First.m_iScreenSize)
  56.             return First.m_iScreenSize;
  57.         else
  58.         {
  59.             return m_iScreenSize;
  60.         }
  61.     }
  62.  
  63.     bool operator==(CLaptop& Right){
  64.         if (this->m_iScreenSize == Right.m_iScreenSize)
  65.             return Right.m_iScreenSize;
  66.         else
  67.         {
  68.             return m_iScreenSize;
  69.         }
  70.    
  71.     }
  72.  
  73.     //bool operator<<(CLaptop& L){ 
  74.     //}
  75.     //bool operator>>(CLaptop& L){
  76.     //}
  77. };
  78.  
  79. class CLaptopShop : public CLaptop{
  80.  
  81. public: vector <CLaptop> m_vSales;
  82.  
  83.         CLaptopShop(vector<CLaptop>laptop)
  84.         {
  85.             m_vSales = laptop;
  86.         }
  87.  
  88.         CLaptopShop(string m_strProducer1, int m_iScreenSize1){
  89.        
  90.             m_strProducer = m_iScreenSize1;
  91.             m_iScreenSize = m_iScreenSize1;
  92.         }
  93.  
  94.         void readin(const ifstream& read){
  95.  
  96.         }
  97.  
  98.         void writeTo(const ostream& out){
  99.        
  100.         }
  101.  
  102.  
  103.         void maxSalesByProducer(string& strProducer, int& iNum){
  104.        
  105.         }
  106.  
  107.         void maxSalesBySize(int& iScreenSize, int& iNum){
  108.        
  109.         }
  110.  
  111. };
  112.  
  113.  
  114.  
  115.  
  116. int main()
  117. {
  118.  
  119.  
  120. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement