Thursday, July 9, 2009

Need help understanding what this C++ programing problem is asking for.?

Hi, I'm not looking for an answer, but merely a lay definition of what my c++ question wants for an answer. The questions is :





Design a class Mailbox that stores mail messages, using the Message class “Message.h” and “Message.cpp” included as part of the assignment. You don't yet know how to store a collection of message objects. Instead, use the following brute force approach: The mailbox contains one very long string, which is the concatenation of all messages. You can tell where a new message starts by searching for a From: at the beginning of a line. This may sound like a dumb strategy, but surprisingly, many e-mail systems do just that.


Implement the following member functions:


void Mailbox::add_message(Message m);


Message Mailbox::get_message(int i) const;


void remove_message(int i) const;


What do you do if the message body happens to have a line starting with "From:"? Then the to_string function of the Message class should really insert a (question continued in detai

Need help understanding what this C++ programing problem is asking for.?
You get given a class called Message. You need to develop a class called Mailbox that implements the following functions:





void Mailbox::add_message(Message m);


Message Mailbox::get_message(int i) const;


void remove_message(int i) const;





The question tells you what their implementation should be like.


You are not developing an entire program, just one class that would be a part of a bigger program. The user isn't seeing anything and there is no use interface because this class is supposed to just be a helper to a bigger program.





Good lucl!
Reply:I don't follow your question to well but I would recommend going here it gives examples of all sorts of c++ mail designs.


http://www.example-code.com/vcpp/SimpleS...


No comments:

Post a Comment