CSCE 2004 - Homework 7
Due Date - 04/18/2014 at 11:59 PM

1. Problem Statement:

The primary goal of this programming assignment is to give students experience defining, implementing and using classes in their program. In particular, you will be developing a program to store, process, and display information about popular tweets.

Your task is to create a "Tweet" class that captures three pieces of data about each tweet (date, hashtag, and contents).

Your "Tweet" class should implement the following methods:

The set method uses the parameters provided to change the data of the Tweet. It is similar to an assignment statement wherein the old values are replaced by new values. The get method retrieves the three pieces of data from the Tweet via reference parameters. The print method displays the data in one line so it can be easily read.

Your goal is to implement all of the methods in the Tweet class so that the provided main program works properly.

2. Design:

Normally object oriented design begins with an analysis of the data and operations that belong together. In this case, you have been given a complete main program with all the method calls in place, so you only need to worry about how to store and manipulate the data by completing the method body. You also need to decide what parameters and return values the operations FillBlog and PrintBlog require.

3. Implementation:

Make a separate directory for hw7 and copy the 5 provided files (tweet.h, tweet.cpp, hw7.cpp, MakeFile, Tweet_Data.txt) in your own directory by doing:

mkdir hw7
cd hw7
cp ~sgauch/public_html/2004/S14/hw/hw7/* .

and compile by typing "make". The files provided should compile and run properly.

Complete the Tweet class one method at a time and test it. Start with the default constructor and Print. For each method:

  • Remove the comments around the method prototype in tweet.h

  • Write a simple method body (just cout and/or set parameters to "test") in tweet.cpp

  • Remove the comments around the method call in hw7.cpp

  • Compile and test the simple version of the method

  • Fill in the real body of the method

  • Compile and test the real version of the method

  • Be sure to implement all of the methods described in tweet.h. Be sure to complete one method before writing code for the next.

    Note: You are NOT ALLOWED to change the method prototypes in tweet.h nor the method calls in the main program.

    4 . Testing:

    We have written the test cases for you in our main program. Just capture the output of the program and submit it. If you do additional error checking, you may add additional test cases _after_ the code written main.

    5 . Documentation:

    When you have completed your C++ program, write a short report (less than one page long) describing what the objectives were, what you did, and the status of the program. Does it work properly for all test cases? Did you find this project interesting? Are there any known problems? What would you add to improve the functionality of your program.

    Add your testing as an appendix at the bottom of the report.

    Save this report in a text or pdf file.

    6. Project Submission:

    In this class, we will be using electronic project submission to make sure that all students hand their programming projects on time. When you have completed the tasks above go to the Homeworks tab on the course's Blackboard web site to "upload" your report (a single pdf or txt file), and your C++ program (a single cpp or txt file). Do NOT upload an executable version of your program. To upload , simply scroll down all the way down to the end of Homework description, then click on "Browse My computer" and attach your files one at a time. Do not write any other text in "comment" section or by clicking "write submission" button. After you attached the files, click on "Submit" button. You are allowed to submit more than once; only the last sumitted homework will be graded.

    Every student should UPLOAD two (2) files:

    1) TA_StudentID_code.txt - This is your source code (.cpp) file. Do not use any Word processor or WordPad as they automatically add extra characters to your code that causes it not to compile. You can use TextPad or NotePad in Windows; nano or any text editor on linux; TextEdit on Mac (select Plain Text under preferences, save as ASCII)

    2) TA_StudentID_report.pdf or TA_StudentID_report.txt
    There is a 10% penalty for not uploading the right formats and not naming the files correctly. For example, if your StudentID is 010590222 and your TA is Eugene, you should upload two files: Eugene_010590222_code.txt and Eugene_010590222_report.pdf.

    The TA names are Alborz, Alex, Eugene

    The dates on your electronic submission will be used to verify that you met the due date above. All late projects will receive reduced credit:

    - 10% off if less than 1 day late,

    - 20% off if less than 2 days late,

    - 30% off if less than 3 days late,

    - no credit if more than 3 days late.

    You will receive partial credit for all programs that compile even if they do not meet all program requirements, so handing projects in on time is highly recommended. Programs that do not compile on turing will receive an automatic deduction of 60%.

    Academic Integrity This assigment is to be done individually. All code must be written by the student doing the submission.