Purpose

The purpose of this lab is to get you to go into the lab, write a very simple program, run it and meet a TA.

Requirements

Your program must print a greeting and then print a short song or poem of your choosing. My output looks like this:

Hello fabulous TA!

My wife wrote this limerick about me:

 To marry a man such as you
 would be like marrying into a zoo,
 
 Your face is too square,
 Your sense of humor too rare,

 and the smell of your body, p u!

Getting Ready - Your Editor

We strongly recommend that you use Visual Studio. If you are working on a lab computer it is already installed.

Visual Studio, however, is a windows only program. If your home computer uses Windows you can download the free or “express” version of Visual Studio from the Microsoft website.

If your home computer is a Mac you have some other options. We recommend that you use Xcode, but it is also possible to use Eclipse.

Now that you've made your choice make sure you know how to correctly install your program(if necessary), and build and run a basic project, by following the instructions at the appropriate link:

Many errors can be easily avoided by carefully following these instructions to set up your project.

Think before programming

For most students new to programming the biggest problem here will be getting over their own inertia, getting into the lab and trying! I strongly encourage you to just do it, do not put this off. It is not hard.

Before you begin any programming project, including even this first one, I encourage you to think about the things your program deals with. We will add more things to consider later, but for now we will worry about just two, one of which is trivial.

  1. Inputs
  2. Outputs

In this case there are no Inputs, other than running the program itself. The Output is the sequence of text you are trying to produce. A sequence of steps is the most basic kind of programming.

In addition to thinking about the program itself, you might also want to consider the purpose of this lab. Remember that it is intended to get those of you that are entirely new to programming use to the fact that this is something you can do, simple programs are simple. Many of you are also new to the university environment. This lab is also intended to help you realize that there are many resources here which you should use to help you succeed. There is a computer lab with computers all set up for your use (1119 TMCB) and there are Teaching Assistants who can help you. Assuming you have found the classroom, this movie will help you find the lab.

Getting Help

If you get stuck:

  1. First try to google your question. Chances are really good someone has had your problem before.
  2. Second ask the person sitting next to you. They'll feel good helping you and if they don't know you will learn together!
  3. As a last resort if you need help from a TA (and you are working in the lab), please use the help request queue:

http://aml.cs.byu.edu/~kseppi/cs142help.html

The TA's love to help, but you will gain much more in learning how to solve your problems on your own!

I need more than this

Some of you have already done some programming. I still need you to get used to the computer labs, Visual C++, the TA's and the pass off process. If you want a little more to think about and 5% extra credit, think about what I could do if I wanted a double quote symbol to appear in the output? Can I just put it in along with the other characters I want printed out? Try it, you will find that C++ does not like that! It uses the double quote symbol to identify the beginning and ending of text that is to be printed verbatim. You could put two single quotes next to each other, but that is not the same. I really want one (or more) double quote symbols. You can read ahead to find the answer, it is explained in the section on “Escape Sequences”.

Pass-off procedure

When you have your program working, you will need to show it to a TA.

Put yourself in the help request queue to pass off: http://taohelpqueue.appspot.com/requesthelp/YPK364KMSA5U5QF55UCL8LQ3JHCS5C.

The TA will evaluate your code based on the following criteria:

  1. Did you print anything at all? (7 points)
  2. Did you print out text on separate lines in some reasonable way? (6 points)
  3. Did you format your code as shown in the book and in class, with separate lines and indenting. (6 points)
  4. Did you find your own poem! (1 point)

Extra credit: Did you find out how to print out a double quote and demonstrate it in your program? (1 point)

An example pass-off form is shown below for this lab. You will find printed pass-off forms in 1119 TMCB.

300px

cs-142/hello-ta.txt · Last modified: 2015/01/07 08:51 by ryancha
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0