NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

#include "Contact.cpp"
#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main(){

string choice;

string type;
string name;
string phone;
string mobilephone;
string fax;
string address;
string city;
string email;

int giris_sayisi=0;
int kisi_sayisi=0;
int sirket_sayisi=0;
int sirket_sayisibilgi=0;
int kisi_sayisibilgi=0;
int email_sayisi=0;
int i=0;
int kont1=0;
int kont2=0;
int kont3=0;


Contact nesne("-1","-1","-1","-1","-1","-1","-1","-1"); //ici bos
Contact temp("-1","-1","-1","-1","-1","-1","-1","-1"); //ici bos

cout<<nesne.getPhone();
Contact kayit[20];





do{

cout<<"nMenu:n"<<"--------n"<<"1-Create a Contactn"<<"2-Get Infon"<<"3-Set Phone Infon"<<"4-Set Email Infon"<<"5-Statisticsn"<<"---------n"<<"Enter your choice: "<<endl;
cin>>choice;

if(choice=="1"){

if(giris_sayisi>=20)
cout<<"You can not entry more than 20!";
else{


cout<<"Please enter the contact of type (company/person:"<<endl;
cin>>type;

while((type!="company") && (type !="person")){
cout<<"Type info is mandotory.Please enter the proper contact of type(company/person): "<<endl;
cin>>type;
}

if(type=="company"){
++sirket_sayisi;
cout<<"Please enter the company name: "<<endl;
cin>>name;
while(name==""){
cout<<"Name info is mandatory.Please enter your name:"<<endl;
cin>>name;
}
nesne.setType(type);
nesne.setName(name);
}
else if(type=="person"){
++kisi_sayisi;
cout<<"Please enter the person name: "<<endl;
cin>>name;
while(name==""){
cout<<"Name info is mandotory.Please enter your name:"<<endl;
cin>>name;
}

nesne.setType(type);
nesne.setName(name);
}

cout<<"Please enter phone number info:"<<endl;
cin>>phone;


if(phone==""){
nesne.setPhone("-1");
}
else{

nesne.setPhone(phone);

}


cout<<"Please enter mobile phone number info:"<<endl;
cin>>mobilephone;
if(mobilephone=="")
nesne.setMobilephone("-1");
else
nesne.setMobilephone(mobilephone);

cout<<"Please enter fax number info:"<<endl;
cin>>fax;
if(fax=="")
nesne.setPhone("-1");
else
nesne.setPhone(fax);

cout<<"Please enter address info:"<<endl;
cin>>address;
if(address=="")
nesne.setAddress("-1");
else
nesne.setAddress(address);


cout<<"Please enter city info:"<<endl;
cin>>city;
if(city == "")
nesne.setCity("-1");
else
nesne.setCity(city);

cout<<"Please enter email info:"<<endl;
cin>>email;
if(email=="")
nesne.setEmail("-1");
else
nesne.setEmail(email);

++giris_sayisi; // 20 kayıt daha yapılabilir.

if((nesne.getType()=="company")&&(nesne.getPhone()!="-1")&&(nesne.getPhone()!="-1")&&(nesne.getMobilephone()!="-1")&&(nesne.getEmail()!="-1"))
++sirket_sayisibilgi;

if((nesne.getType()=="person")&&(nesne.getPhone()!="-1")&&(nesne.getPhone()!="-1")&&(nesne.getMobilephone()!="-1")&&(nesne.getEmail()!="-1"))
++kisi_sayisibilgi;

kayit[i]=nesne; //oluşturulan contact kaydedildi
++i;

}
}
else if(choice=="2"){

cout<<"Please write Contact's type and name to get info:"<<endl;
cout<<"Type: ";
cin>>type;
cout<<endl;
cout<<"Name: ";
cin>>name;
do{
while((type!="company") && (type !="person")){
cout<<"Type info is mandotory.Please enter the proper contact of type(company/person): "<<endl;
cin>>type;
}



kont1=0;
for(int kont1=0;kont1<20;++kont1){
temp=kayit[kont1];
if((name!=temp.getName())||(type!=temp.getType()))
++kont1;
}
if(kont1==20){
cout<<"The name can not found.Please enter the type and name again"<<endl;
cout<<"Type:"<<endl;
cin>>type;
cout<<"Name:"<<endl;
cin>>name;
}
}while(kont1==20);

cout<<endl;
for(int k=0;k<20;k++){
temp=kayit[k];
if((temp.getName()==name)&&(temp.getType()==type))
nesne=kayit[k];
}

cout<<"Type: "<<nesne.getType()<<endl;
cout<<"Name: "<<nesne.getName()<<endl;
cout<<"City: "<<nesne.getCity()<<endl;
cout<<"address: "<<nesne.getAddress()<<endl;
cout<<"Phone: "<<nesne.getPhone()<<endl;
cout<<"Mobilephone: "<<nesne.getMobilephone()<<endl;
cout<<"Phone: "<<nesne.getPhone()<<endl;
cout<<"Email: "<<nesne.getEmail()<<endl;

}



}while((choice!="-1")); // choice=-1 olunca kayıt bitti anlamındadır.







}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.