Assignment 1

due at midnight on   +40

The purpose of this assignment is to prepare your main C++ development environment, and to build and submit your first program there. As a prerequisite, you should have already: installed the debian-liucs virtual machine, using the package name liucs-cs102. You may also want to skim the Tour of Debian and Using VirtualBox pages for more of an orientation.

Connect to git server

You should see a Git Setup icon on your desktop. If it is missing, update your VM using the apt-get commands in the terminal.

You should also have received a 16-digit hexadecimal activation code from me, sent to your MyLIU email address. You’ll need that now.

Follow the instructions for the Git setup script.

Assuming the setup finishes successfully, it should create a folder cs102 within your home directory. You can investigate it in the file manager:

It should contain a file called README. Double-click the README file, which should open it in medit.

Type your name where shown, and save the file using File » Save on the menu, or Control-S, or the toolbar save button.

Next, select Tools » Sync with git from the medit menu. An output pane should open below, and display output that looks something like this:

Using ~/cs102/.git
> git-add
> git-commit
[master 704b851] sync
 1 file changed, 1 insertion(+), 1 deletion(-)
> git-pull
Already up-to-date.
> git-push
SUCCESS
To git@liucs.net:cs102.git
   84e2d16..704b851  master -> master
*** Done ***

If you do not see SUCCESS in the output pane, then copy and paste the entire contents of that pane in an email to me.

This “Sync with git” facility uploads any files in your cs102 folder to my server, where I can grab and investigate them. This is how you will submit your assignments.

Hello again

Now we will write a short program on your virtual machine. In the medit text editor, select File » New from the menu, and then save it to your cs102 folder, calling it a1-hello.cpp

Type in one of the “hello world” programs, and then select Tools » Run C++ Program from the menu. If your program compiles correctly, a new terminal window will pop up, containing the result of running your new program!

If instead you get some errors in the output pane, they will appear in red and refer to a line number. You can turn on line numbering on the View menu, to help you locate the error.

Once you have a working “hello world” program, you may want to do Tools » Sync with git again, to save it on the server. You can sync as often as you like, so this is a good way to keep a backup copy of your work.