//Hi i do the delivery company project,this are my members of the base class
//how do i create 2 constructors in base,one for sender and one for recipient?
//I did one for sender ,but visual studio does not allow me to create identical for recipient
//Can some one help to figure it out,please?
#pragma once
#include<string>
using namespace std;
class Package
{
public:
Package();
~Package();
protected:
string senderName;
string senderAddress;
string senderCity;
string senderState;
string senderZipCode;
string recipientName;
string recipientAddress;
string recipientCity;
string recipientState;
string recipientZipCode;
double weight;
double ShippingCost;
public:
virtual void CalculateCost(void) = 0;
virtual void Display(void) = 0;
//setters for sender
void SetName(string name);
void SetSenderAddress(string address);
void SetSenderCity(string city);
void SetSenderState(string state);
void SetSenderZipCode(string zipCode);
//getters for sender
string GetSenderName(void);
string GetSenderAddress(void);
string GetSenderCity(void);
string GetSenderState(void);
string GetSenderZipCode(void);
//setters for recipient
void SetrecipientName(string name);
void SetrecipientAddress(string address);
void SetrecipientCity(string city);
void SetrecipientState(string state);
void SetrecipientZipCode(string zipCode);
//getters for recipient
string GetRecipientName(void);
string GetRecipientAddress(void);
string GetRecipientCity(void);
string GetRecipientState(void);
string GetRecipientZipCode(void);
//constructors
Package(string sName, string sAddress, string sCity, string sState, string sZip);
};
aluhnev 0 Junior Poster in Training
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
ddanbe commented: Great recommendation. +15
aluhnev 0 Junior Poster in Training
aluhnev 0 Junior Poster in Training
Banfa 597 Posting Pro Featured Poster
aluhnev 0 Junior Poster in Training
aluhnev 0 Junior Poster in Training
Banfa 597 Posting Pro Featured Poster
aluhnev 0 Junior Poster in Training
Banfa 597 Posting Pro Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.