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.
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!
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.
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.
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.
If you get stuck:
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!
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”.
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:
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.