c++ Program
Step 1: Design a class Message that models an e-mail message. A message has a recipient, a sender, and a message text. Support the following member functions:
//send message using gmail with smtp
void message(void)
{
bool mssg;
if (mssg != true) {
printf("failed
transmission\n");
return;
}
CkString recipient;
recipient = "www.....com";
smtpHostname = mssg.mxLookup(recipient);
if (smtpHostname.getNumChars() == 0 ) {
printf("%s\n",mssg.lastErrorText());
return;
}
printf("%s\n",(const char *)smtpHostname);
mssg.put_SmtpHost(smtpHostname);
email.put_Subject();
email.put_Body();
email.put_From("www.f.com");
email.AddTo("",recipient);
mssg = email.SendEmail(email);
if (mssg != true) {
printf("%s\n",email.lastErrorText());
}
else {
printf("Mail
Sent!!!!!");
}
}
c++ Program Step 1: Design a class Message that models an e-mail message. A message has...
Provide the definition of class Message, which models an email message, in a file named Message.hpp and implement all the required member functions (see below) in a file named Message.cpp. A message contains a header and a body, which are separated by the first full line break in the message. The message header has a sender, a recipient, a subject representing the message heading, a Unix timestamp representing the sending time of the message, a character encoding, which you can...
Implement the Message class using a header and implementation file named Message.h and Message.cpp respectively. In addition to the two Message class files, you must write a driver. The driver must create a Message array that is capable of holding 100 messages (make sure that you don’t exceed the maximum number of Messages). It then must read all Messages from a file named messages.txt (ordered date\n sender\n recipient\n body\n), sort the Messages based on date, find a Message based on...
C++ PLEASE Provide a class for authoring a simple letter. In the constructor, supply the names of the sender and the recipient. The header file for this class is given below. #ifndef LETTER_H #define LETTER_H #include #include using namespace std; class Letter { public: //constructor Letter(string from = "John", string to = "Ana"); void add_line(string line); string get_text() const; private: string sender; string recipient; vector lines; }; #endif -Implement the constructor to initialize...
C++ Intro Class Design a class that models the two main entities involved in the following scenario: You are a software developer at a major technology company. You are designing an OOP program that helps patients with dementia remember their daily activities and information about people. The program helps the user keep track of the time, description, and location of each daily activity. It also helps the user maintain a list of important contacts, including their names, contact information, and...
Registration Language Java Step 1: Design a class called Student. The Student class should contain the following data: firstName lastName studentID totalCredits gpa Your class should implement the “sets” and “gets” for the class. Include methods: equals, compareTo, toString. Change the toString method (from class) to put each member variable on a new line. Step 2: Write a driver program to test that Student works correctly. Test is with 3 students as given in class. Step 3: Write a “registration”...
Design a class for python named PersonData with the following member variables: lastName firstName address city state zip phone Write the appropriate accessor and mutator functions for these member variables. Next, design a class named CustomerData , which is derived from the PersonData class. The CustomerData class should have the following member variables: customerNumber mailingList The customerNumber variable will be used to hold a unique integer for each customer. The mailingList variable should be a bool . It will be...
7. PersonData and CustomerData classes Design a class named PersonData with the following member variables: lastName firstName address city state zip phone Write the appropriate accessor and mutator functions for these member variables. Next, design a class named CustomerData, which is derived from the PersonData class. The CustomerData class should have the following member variables: customerNumber mailinglist The customer Number variable will be used to hold a unique integer for each customer. The mailing List variable should be a bool....
C++
Question 1) Consider a class Point that models a 2-D point with x and y coordinates. Define the class point that should have the following Private data members x and y (of type int), with default values of 0 A constant ID of type int A private static integer data member named numOfPoints This data member should be o Incremented whenever a new point object is created. o Decremented whenever a point object is destructed. A default constructor An...
This is a C++ program Instructions Design a class named PersonData with the following member variables declared as strings: lastName firstName address city state zip phone Create 3 constructors; a default constructor, a constructor that accepts the first and last name member variables, and a constructor that accepts all member variables. Write the appropriate accessor/getter and mutator/setter functions for these member variables. Create a method within this class called getFullName() that returns the person's first and last names as a...