CSCI 261 - Programming Concepts (C++)Fall 2017 - Assignment 1 - Hello World! & ASCII ArtQuick Links: Canvas | CS @ Mines | Cloud9 | Piazza | zyBooks |
|||||||||||||||||||
| Home | Contact | Syllabus | Assignments | Schedule | Resources | | |||||||||||||||||||
This assignment is due
by Tuesday, August 29, 2017 11:59 PM.
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 Assignment1 and then cut/paste the following code into your main.cpp . /* CSCI 261 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 IThe 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.
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 IIIn 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.
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.
From your Cloud9 workspace, right
click on the A1 folder in your workspace tree. Select "Download"
from the pop-up menu. This will download a file called A1.zip to your computer. It
contains all the files of your A1 folder (therefore Lab1A,
Lab1B, Lab1C, Lab1D, A1).
Now in Canvas, go to Assignments > A1. Upload your
A1.zip file you just downloaded. And voila! Easy
peasy.
In summary, follow these specific steps:
This assignment is due
by Tuesday, August 29, 2017 11:59 PM.
| |||||||||||||||||||
Last Updated: 08/29/17 21:32
|