|
Hello everyone, I am working on an individual problem something that i might be able to use in a real work environment. I would like your advice concerning which programming language i should use i have an beginning level of knowledge in C++ but if you think the programm will be easier or more efficient in another language i am willing to learn. The program basically should ask for the customer phone number and then prompt the name and address coresponding to the number. If no match is found it asks about the persons info phone, name, and address.
Any help and insight would be greatly appreciated.
Ginobili
[/CODE] #include <iostream>
#include "Pizza.h"
using namespace std;
int main() { Pizza P; cout << "Please enter phone number: " << endl; cin >> P.setPhoneNumber();
cout << "The address is: "<< P.getAddress() << endl;
return 0; }
class Pizza { public: void setAddress(); void setName(); void setPhoneNumber(); char getAddress(); char getName();
private: char Address; char Name; char PhoneNumber;
};
#include "Pizza.h"
char name, adr, phone;
void Pizza::setName() { Name = name; }
void Pizza::setPhoneNumber() { PhoneNumber = phone; }
void Pizza::setAddress() { Address = adr; }
char Pizza::getName() { return name; }
char Pizza::getAddress() { return adr; }
This post has been edited by ginobili: 15 Dec, 2005 - 12:49 PM
|