CS 160 - Programming Concepts and Applications

Summer II 2018 - A1 - Hello World! & ASCII Art

Quick Links: Canvas | John Cabot | Piazza | zyBooks

|   Home |  Contact |  Syllabus |  Assignments |  Schedule |  Resources   |

This assignment is due by Tuesday, July 3, 2018, 11:59 PM.

· Instructions · Rubric · Submission ·


Let's Start!



In this homework assignment, we focus on two of our programming concepts: (1) defining variables and (2) using output.

To begin this assignment (and future homework assignments), you need to create an empty C++ Project. See Creating a C++ Empty Project in Lab1A as a reminder of the steps. We suggest you call your new project A1 and then cut/paste the following code into your main.cpp .

/* CS 160 Assignment 1: Hello World and ASCII Art
 *
 * Author: XXXX (_INSERT_YOUR_NAME_HERE_)
 *
 * More complete description here...
 */

// The include section adds extra definitions from the C++ standard library.
#include <iostream> // For cin, cout, etc.

// We will (most of the time) use the standard library namespace in our programs.
using namespace std;

// Define any constants or global variables below this comment.

// Must have a function named "main", which is the starting point of a C++ program.
int main() {

    /******** INSERT YOUR CODE BELOW HERE ********/

    cout << "Ready to code!! Wait, I need to fill it all in myself?" << endl;

    /******** INSERT YOUR CODE ABOVE HERE ********/

    return 0; // signals the operating system that our program ended OK.
}


Instructions: Part I



The first goal of this assignment is to create a smiley face that is printed on the screen. Here is a simple example. (We expect your smiley face will be better than this, and actually smile!)

 ######
# O  O #
#  {}  #
# ____ #
#      #
 ######

You can visit this site to learn more about ASCII and ASCII Art if you would like. Or Google images of "ascii art smiley faces" (favorite one from Northwestern follows).




You need to use a combination of cout statements to create a face that gets printed to the screen. Most likely, you will need to edit your code, 'Build' and then 'Run' your code several times. Following these steps again and again is what C++ programmers always do, in fact we call it the edit-compile-test cycle. Once you are happy with the output of your smiley face, move on to Part II of this assignment.


Instructions: Part II



In this second homework goal, you need to declare and assign appropriate values to three facts about yourself. The three facts can be anything that is true about you (perhaps things you are proud of). For example, how high can you jump (in inches), how many seconds can you hold your breath, or how fast can you run. All three variables must be of an appropriate data type.

Once your variables are defined, add code to display the information stored in your variables below your smiley face. An example output follows:

Hello World!
I am 21 years old.
I can run 100m in 13.2s.
I enjoyed 7 cookies yesterday.
Goodbye!


Grading Rubric


Your submission will be graded according to the following rubric.

PointsRequirement Description
2 All code submitted properly.
6 All labs completed and submitted
2 In-class exercises completed.
2 Assignment compiles
6 Awesome ASCII art printed and formatted properly on screen.
3 Interesting facts about you printed to screen.
6 (1) Comments used
(2) Coding style followed
(3) Appropriate variable names, constants, and data types used
(4) Instructions followed
27 Total Points

This assignment is due by Tuesday, July 3, 2018, 11:59 PM.


Submission


Always, always, ALWAYS update the header comments at the top of your main.cpp file. And if you ever get stuck, remember that there is LOTS of help available. The following instructions are copied from How to Submit Homework.


It is critical that you follow these steps when submitting homework.

If you do not follow these instructions, your assignment will receive a major deduction. Why all the fuss? Because we have several hundred of these assignments to grade, and we use computer tools to automate as much of the process as possible. If you deviate from these instructions, our grading tools will not work. And that makes us very unhappy. And when we're unhappy, we give penalties. Thus, make us happy.


Submission Instructions



Here are step-by-step instructions for submitting your homework properly:
  1. File and folder names are extremely important in this process. Please double-check carefully, to ensure things are named correctly.
    1. The top-level folder of your project must be named Set1
    2. Inside Set1, create 4 sub-folders that are required for this Set. The name of each sub-folder is defined in that Set (e.g. L1A, L1B, L1C, and A1).
    3. Copy your program main.cpp and supporting files into the subdirectories of Set1 (steps 1-2), zip this Set1 folder (steps 3-4), and then submit the zipped file (steps 5-11) to Canvas.
    4. For example, when you zip/submit Set1, there will be 4 sub-folders called L1A, L1B, L1C, and A1 inside the Set1 folder, and each of these sub-folders will have a file called main.cpp and nothing else.

  2. You will need to download each project file(s) from Codenvy to your computer.

  3. Using Windows Explorer (not to be confused with Internet Explorer), find the file named "main.cpp" located inside the folder for the particular lab or homework assignment you will submit.

    STOP: Are you really sure you are viewing the correct assignment's folder?

  4. Now, for A1, right click on the main.cpp to copy the file. Then, return to the Set1/A1 folder and right click to paste the file. In other words, put a copy of your homework's main.cpp source code and supporting files into the Set1/A1 folder.

    Follow the same steps for L1A, to put a copy of your lab's main.cpp and supporting files into the Set1/L1A folder. Repeat this process for Set1/L1B, Set1/L1C.

    STOP: Are you sure your Set1 folder now has all your code to submit?

  5. Now, right-click on the "Set1" folder.
    1. In the pop-up menu that opens, move the mouse "Send to..." and expand the sub-menu.
    2. In the sub-menu that opens, select "Compressed (zipped) folder".

    STOP: Are you really sure you are zipping a Set1 folder with sub-folders that each contain a main.cpp file in it?

  6. After the previous step, you should now see a "Set1.zip" file.

  7. Now visit the Canvas page for this course and click the "Assignments" button in the sidebar.

  8. Find Set1, click on it, find the "Attach file" area, and then click the "Browse My Computer" button.

  9. Find the "Set1.zip" file created earlier and click the "Open" button.

    STOP: Are you really sure you are selecting the right homework assignment? Are you double-sure?

  10. WAIT! There's one more super-important step. Click on the blue "Submit" button to submit your homework.

  11. No, really, make sure you click the "Submit" button to actually submit your homework. Clicking the "Open" button in the previous step kind of makes it feel like you're done, but you must click the Submit button as well! And you must allow the file time to upload before you turn off your computer!

  12. Canvas should say "This assignment is complete. Click OK to review the results.". Click "OK" and view the files within the zip file you submitted. In other words, verify you submitted what you think you submitted!
In summary, you must zip the "Set1" folder and only the "Set1" folder, this zip folder must have several sub-folders, you must name all these folders correctly, you must submit the correct zip file for this homework, and you must click the "Submit" button. Not doing these steps is like bringing your homework to class but forgetting to hand it in. No concessions will be made for incorrectly submitted work. If you incorrectly submit your homework, we will not be able to give you full credit. And that makes us unhappy.


This assignment is due by Tuesday, July 3, 2018, 11:59 PM.

Last Updated: 07/01/18 22:06


Valid HTML 4.01 Strict Valid CSS! Level Triple-A conformance, W3C WAI Web Content Accessibility Guidelines 2.0