CSIS 3150/01: Programming Languages

Assignment #2

 

 

 

Assignment Description:

 

1.         Write a program to count how many times each distinct word appears in its input. (P49 3-3)

(For example, if user inputs the line “today is really really really cold”. The output should say “today appears once, is appears once, really appears 3 times…)

 

2.         Write a program to report the length of the longest and shortest strings in its input. (P49 3-4)

            (For example, if user inputs the line “today is really cold”. The output should show the 6 for longest one, 2 for shortest one)

 

3.         Write a program to output the words in the input in reversed order. 

            (For example, if user inputs the line “today is really cold”. The output should be “cold really is today”)

 

Write one driver program (a main function in it) for the problem as stated in each exercise.

 

A good program is easy to navigate, and is robust (i.e., use exception handling and error detection). Save all code for possible future use.

 

Make sure to include a header for each program you write, with the following information: your name, course info, submission date, problem #, and problem description. Also, include in-line comments in your code for major section to explain what the code does in the context of the problem being solved. Indent and space code properly.

 

Submission Criteria:

 

1.      Submit in class on the due date a printed copy of the main program and any developed classes/methods for each programming exercise.

 

2.      Include assignment cover page (posted on the course Webpage). No submission will be accepted without a cover page.

 

3.      Submit printout of sample inputs and their outputs for each program. For each program, staple its inputs and outputs at end of printed code.

 

4.      Along with the printouts, submit complete source code for each exercise to yshi04@gmail.com including header files and other files your program uses. Please submit just ONE email with the attachment of all code files.

 

5.      Please place you complete submission in an envelope or a secure folder with your name on it.

 

6.      Late submissions will be penalized as per the Assignments Policy (15% per day).

 

 

 

 

Assignments Policy

All class assignments are part of the course final grade. Missing any assignment counts as incomplete of the class and may result in a failing grade for the course. Assignments must be turned in at the beginning of the class on the due day.  Late assignments will be penalized at the rate of 15% per day including weekends. No late assignments will be accepted after four days of the due date.

Successfully completed programs must satisfy their requirements outlined in the programming assignments. The maximum score depends on the quality of the program. This scale represents a general grading guideline:

(a)   Partial code is not acceptable --- receives 0 points.

(b)   Complete code that does not compile --- may receive up to 20%

(c)   Complete code that compiles but does not run --- may receive up to 30%

(d)   Complete code that runs but gives incorrect results --- may receive up to 50%

(e)   Complete code that gives complete and correct results --- receives 100%

 

Points may vary for each assignment depending on the complexity and required effort. However, 10% of the grade for programs in categories (d) and (e) above will be dedicated to proper comments and in-line documentation, and another 10% of the grade will be dedicated to indentation, code organization, and readability. The assignments will be graded using the C++ compiler on cloudland.kennesaw.edu.

 

All assignments are individual assignments. You are encouraged to discuss assignments with other students as long as the following rules are followed:

 

(a)   You may provide assistance on how to use any of the software used by this course.

(b)   You view another student's code only for the purpose of offering debugging assistance. Students can only give advice on what to look for, but they cannot debug your code for you. All changes to your code must be made by you.

(c)   Your discussion is subject to the empty hands policy, which means that you leave the discussion without any record (electronic or physical) of the discussion.