CSCI 261 - Programming Concepts - Fall 2020

A1 - Hello World! & ASCII Art

This assignment is due by Thursday, September 03, 2020, 11:59 PM.
As with all assignments, this must be an individual effort and cannot be pair programmed. Any debugging assistance must be provided in accordance with the course collaboration policy.
Do not forget to complete the following labs with this set: L1A, L1B, L1C .
Do not forget to complete the APT for this set.

· Instructions · Rubric · Submission ·


Let's Start!


In this homework assignment, we focus on three of our programming concepts: (1) defining variables, (2) using input, and (3) 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 .

/* CSCI 261 Assignment 1:
 * Hello World and ASCII Art
 *
 * Author: XXXX (INSERT_NAME)
 *
 * 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!!" << endl;
  cout << "Wait! ";
  cout << "I need to fill it in myself?" << endl;

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

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

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).


Smily Face

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.

Bonus!!! we'll have a small prize for the best smiley face submitted in each section, and a larger prize for the best smiley face submitted in all sections. Good luck!


Instructions: Part II


In this second homework goal, you need to declare and input 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 and you must use at least two different data types for your variables.

Once your variables are defined, add code to prompt the user to enter these values, and then display the information stored in your variables below your smiley face. An example run of the program follows:

8^D

Hello World!
How old are you?  21
How fast can you run 100 meters?  13.2
How many cookies did you most recently eat?  7

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
8 APT1 completed through AutoGrader.
2 All code submitted properly.
12 All labs completed and submitted.
2 Assignment compiles.
2 Awesome ASCII art printed and formatted properly on screen.
6 Interesting facts about you input and output to screen using appropriate variables.
4 (1) Comments used.
(2) Coding style followed.
(3) Appropriate variable names, constants, and data types used.
(4) Instructions followed.
36 Total Points

This assignment is due by Thursday, September 03, 2020, 11:59 PM.
As with all assignments, this must be an individual effort and cannot be pair programmed. Any debugging assistance must be provided in accordance with the course collaboration policy.
Do not forget to complete the following labs with this set: L1A, L1B, L1C .
Do not forget to complete the APT for this set.


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.

It is critical that you follow these steps when submitting homework. You can view these steps by watching the Windows / Mac video.

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.


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 files into the subdirectories ofSet1 (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 the associated files.

  2. 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?

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

    Follow the same steps for L1A, to put a copy of your lab's main.cpp 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?

  4. 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?

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

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

  7. Find Set1, click on it, find the "Submit Assignment" area, and then click the "Choose File" button.

  8. 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?

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

  10. No, really, make sure you click the "Submit Assignment" button to actually submit your homework. Clicking the "Choose File" 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!

  11. Canvas should say "Submitted!". Click "Submission Details" and you can download the zip file you just 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 Assignment" 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 Thursday, September 03, 2020, 11:59 PM.
As with all assignments, this must be an individual effort and cannot be pair programmed. Any debugging assistance must be provided in accordance with the course collaboration policy.
Do not forget to complete the following labs with this set: L1A, L1B, L1C .
Do not forget to complete the APT for this set.