Senin, 12 Maret 2012

spesifikasi pc

#include <iostream>
#include <string>
#include <conio.h>
using std::string;



  class Pc
  {
  public:

     void setPc( int name )
     {
        nama_pembeli = name;

     }


     int getnama_pembeli()
     {
        return nama_pembeli;
     }

     string getnama_komputer()
     {
         return nama_komputer;
     }


     void tampilan()
     {

        switch( getnama_pembeli() )
        {
            case 0: {
                        cout<< " Terima Kasih "<<endl;
                        break;
                    }

            case 1: {
                        cout << "PC yang Dipilih Alienware Aurora "<<endl;
                        cout << "Spesifikasi "<<endl;
                        cout << "3000 Series Intel Six Core i7 processors"<<endl;
                        cout << "16GB 1600Mhz Quad Channel memory"<<endl;
                        cout << "1.25GB GDDR5 NVIDIA® GeForce® GTX 560 Ti video card"<<endl;
                        cout << "2TB RAID 1+0 performance hard drive"<<endl;
                        cout << "High-performance CPU liquid cooling unit"<<endl;
                        cout << "Optional Alienware ALX chassis with active venting"<<endl;
                        break;
                    }
            case 2: {
                        cout << "PC yang Dipilih HP Evo Dc 7600C "<<endl;
                        cout << "Spesifikasi "<<endl;
                        cout << "Pentium4 630"<<endl;
                        cout << "256MB DDR2"<<endl;
                        cout << "80GB HDD SATA"<<endl;
                        cout << "48x CD-ROM"<<endl;
                        cout << "VGA Intel GMA950 64MB shared"<<endl;
                        cout << "Audio"<<endl;
                        cout << "GbE NIC 15"<<endl;
                        break;
                    }

            case 3: {
                        cout << "PC yang Dipilih Compaq Presario SG3770IL "<<endl;
                        cout << "Spesifikasi "<<endl;
                        cout << "Intel Core 2 Duo Processor E7400, 2.8 GHz"<<endl;
                        cout << "2-GB PC2-6400 DDR2 800 MHz RAM"<<endl;
                        cout << "320 GB SATA II Hard drive"<<endl;
                        cout << "16X DVD Super Multi Drive Dual Layer"<<endl;
                        cout << "Intel Graphics Media Accelerator GMA950 with DVMT 3.0"<<endl;
                        cout << "7.1 Surround Sound Ready"<<endl;
                        cout << "6 USB 2.0 ports"<<endl;
                        break;
                    }


        }


     }
  private:
     int nama_pembeli;
     string nama_komputer;
  };

  int main()
  {
     int pembeli;
     string komputer;
     Pc myPc;


     do{
     cout << "Selamat datang di pengecekan spesifikasi komputer WR5 Hardware\n"<<endl;
     cout << "\nPilihan "<<endl;
     cout << " 1. Alienware Aurora"<<endl;
     cout << " 2. HP Evo Dc 7600C"<<endl;
     cout << " 3. Compaq Presario SG3770IL"<<endl;
     cout << " 0. Keluar "<<endl;
     cout << " Masukan Pilihan Anda : ";
     cin>>pembeli;
     myPc.setPc( pembeli);

     cout << endl;
     myPc.tampilan();
     getch();
     clrscr();
 }while(pembeli != 0);

     return 0;
  }

Tidak ada komentar:

Posting Komentar