Here is the methods I need to write. I wrote the rest of the program and just need help with the methods to finish...PLEASE HELP!
Methods
void print()
This method displays the Seller information. It takes no arguments and returns nothing.
The information should be displayed as follows:
Giant, Andre BIG357 678.53
void setFirstName( char newFirstName[] )
This method changes a Seller's first name. It takes one argument: an array of characters that represents the Seller's first name. It returns nothing.
If the length of newFirstName is greater than 0, it should be used to initialize the firstName data member. Otherwise, the firstName data member should be set to "None". For example:
if( strlen( newFirstName ) > 0 )
{
strcpy( firstName, newFirstName );
}
else
{
strcpy( firstName, "None" );
}
void setLastName( char newLastName[] )
This method changes a Seller's last name. It takes one argument: an array of characters that represents the Seller's last name. It returns nothing.
If the length of newLastName is greater than 0, it should be used to initialize the lastName data member. Otherwise, the lastName data member should be set to "None".
void setID( char newID[] )
This method changes a Seller's id number. It takes one argument: an array of characters that represents the Seller's id number. It returns nothing.
If the length of newID is greater than 0 and less than 7, it should be used to initialize the ID data member. Otherwise, the ID data member should be set to "ZZZ000".
void setSalesTotal( double newSalesTotal )
This method changes a Seller's sales total. It takes one argument: a double that represents the Seller's sales total. It returns nothing.
If the passed in newSalesTotal is greater than or equal to 0, it should be used to initialize the salesTotal data member. Otherwise, the salesTotal data member should be set to 0.
double getSalesTotal(
This method returns a Seller's sales total data member. It takes no arguments.