All of the work in this project is my own!  I have not left copies of my code in public folders on university computers. I have not given any of this project to others. I will not give any portion of this project to others taking this class. I realize that the penalty for turning in work that is not my own can range from an "F" in the class to dismissal from Trinity University. 

                                                                                             Print Name  __________________________

                                                                                              Signature   __________________________

                                                                                             Print Name  __________________________

                                                                                              Signature   __________________________
 


First Programs Lab
Individual/Team (1-2) Assignment
15 Points


Set Netscape Margins [ Left = 1; Right = .2; Top = .6; Bottom = .6; Select Document Title, Location,  Page Number, Page Total Black Text l]


1]  Type in program 2.1. Call the program  Greetings1.cpp. Do not use the line

            using namespace std;

Skip the books comments! Each and every program file that you do this semester must include a documentation box at the top. 

Make the documentation box 75-80 characters wide. Do not use the tab key in the documentation box. Use the following format. 

//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//                               Greetings.cpp                                  //
//                                                                              //
// Purpose : Display Hello World.                                               //
//                                                                              //
// Written By : Your Name(s)                      Environment : Red Hat Linux   //
// Date       : xx/xx/xx                             Compiler : g++             //
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////

2] Always make sure that the braces {} are lined up in pairs.

3] Always indent the code within each module, including main.

4] Program 2.1 should look like the following when finished. 
 

//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//                               Greetings.cpp                                  //
//                                                                              //
// Purpose : Display Hello World.                                               //
//                                                                              //
// Written By : Your Name(s)                      Environment : Red Hat Linux   //
// Date       : xx/xx/xx                             Compiler : g++             //
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// 

# include <iostream.h>
# include <string.h>

int main( )
{
   cout << "Hello World" << endl;
   return 0;
}

3] Compile the program to produce the executable/binary  a.out file! 

g++ Greetings1.cpp

4] Execute the program.

a.out

If there are errors, correct them and recompile [ step 3].

5] The program works! Start a Windows 2000/NT/98/95/Me/XP system that has Visual Studio. Print it from within windows using Visual C++. Print this and every other program that you turn in this semester with a left margin to 1" and a right margin to .5". Make the font   New Courier 8.
 
             Visual C++ Printing: Page SetUp & Font Selection

6] Do Steps 1-5 for Program 2.2. Call it SalesTax.cpp

7] Do Steps 1-5 for Program 2.3. Call it Greetings2.cpp

8] Do Steps 1-5 for Program 2.4. Call it Greetings3.cpp Include the book's comments/documentation!

9] Do Steps 1-5 for Program 2.5. Call it Greetings4.cpp Include the book's comments/documentation!

10] Do Steps 1-5 for Program 2.6. Call it ComputeY.cpp Do not include any of the books comments. Select good variables for all. Use X, Y, and Slope as opposed to x, y, m!

11] From within Windows, copy files Greetings1.cpp, SalesTax.cpp, Greetings2.cpp, Greetings3.cpp, Greetings4.cpp, ComputeY.cpp  to a floppy disk. Copy files Greetings1.cpp, SalesTax.cpp, Greetings2.cpp, Greetings3.cpp, Greetings4.cpp, ComputeY.cpp  to a second floppy disk. 



12] Those Labs labeled "Individual Assignment" are to be done separately by each individual. Using a pen,  each individual is to print  his/her name at the top of this document in the space provided and sign it.  Those Labs labeled "Team Assignment" may be done as a team or individually. Using a pen,  each individual on the team is to print print his/her name at the top of this document in the space provided and sign it. Submit only one copy of team assignments!

Include the following in your wire-band binder:

A] Divider

B] Copy of this assignment sheet. Using an ink pen, print your name and sign this lab at the top.

C] Listings Greetings1.cpp, SalesTax.cpp, Greetings2.cpp, Greetings3.cpp, Greetings4.cpp, ComputeY.cpp 

D] Disk containing the files.