Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 398 Weeks Ago, 5 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 14 Sep 2017 My Price 9.00

Fuller Mailbox

This project needs to be done with C++

Project 1: Fuller Mailbox
I have provided you with a sample class named Mailbox which has been diagrammed below. You can acquire the source to the Mailbox class by clicking on the link for your development environment ( VS2012 XCode5 ). Using the Mailbox class provided earlier, upgrade the class so that it supports various operators. Make operator+ combine together the contents of two Mailbox, as long as the contents does not exceed the size. Make operator- subtract one Mailbox contents from another, as long as the size or contents don't go negative. Support the >> and << operators to allow instances to be read from cin or written to cout. Make the boolean operators <, >, <= and >= test Mailbox's contents. Make the boolean operator == and != test all of the data members of a Mailbox for an exact match.

Implementation Details Sample Driver

Mailbox

Mailbox();
Mailbox( string address );

void setSize( int amount );
int getSize( );
void setAddress( string address );
string getAddress();
int getContents();

void pickupMail();
int deliverMail( int pieces );

string my_Address;
int my_Size;
int my_Contents;

Mailbox yours( "your address" );
Mailbox mine( "1900 Pico Boulevard" );
Mailbox test( "test" );

yours.setSize( 10 );
mine.setSize( 10 );
test.setSize( 5 );

yours.deliverMail( 5 );
mine.deliverMail( 6 );
test.deliverMail( 5 );


test = yours + mine;
/// contents will become negative...
/// this should print an error
test = yours - mine;


/// test should have 11 pieces of mail
test = yours + mine;
cout << test;

if (test > yours) {
cout <<"test is bigger"<< endl;
}
if (test >= mine) {
cout <<"test is bigger or equal"<< endl;
}
if (yours < mine) {
cout<<"yours is smaller"<<endl;
}
if (yours <= test) {
cout<<"yours is smaller or equal"<<endl;
}
if (yours != test) {
cout <<"yours != test!"<<endl;
}
if (yours == yours) {
cout <<"equal test works"<<endl;
}

  Sample Output
  CanA????1t A????1 and wind up with a negative contents!
11 pieces of mail in this mailbox
test is bigger
test is bigger or equal
yours is smaller
yours is smaller or equal
yours != test!
equal test works

 

Answers

(5)
Status NEW Posted 14 Sep 2017 10:09 PM My Price 9.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)