Eustis Setup Assignment
Possible Points | Due Date |
---|---|
50 pts | Sunday September 3rd - 11:59pm |
Overview
Throughout this course, you will complete small programming assignments. These small programming assignments will contain a variety of problems that must be solved in the C language. You will use the techniques discussed in class to solve these problems. Once you have coded up the solution in C you will need to test your code. Testing your code involves doing two things:
- First you must upload your
.c
program file to the Eustis server and compile it. - You must run the test python script to determine if your program is working correctly.
These two steps ensure that your code will run as intended on the Eustis server where your code will be tested, and will give you a chance to determine whether your program is working correctly according to our tests. The test python file will run your program with various different test inputs, and ensure that the output is as expected. As an instructor, I have a master test script file that will test all student's code and provide me with a report as to which students got which parts of the assignment correct. However, in addition to these automated test scripts, myself and the grader for this course will also be reading your code and grading you on your comments and style.
Warning
Before starting this assignment, you should follow the Eustis Tutorial, accessible via the button below!!
Assignment Instructions
Step 1: Connect to Eustis
Please follow the Eustis Setup Tutorial to connect to Eustis. If you are able to see the following figure with your NID, then you have successfully connected to Eustis.
Info
Note the login screen will look different for Mac users using Terminal.app
and Windows users using MobaXterm
.
Step 2: Creating Your C Program File on your Local Machine
After successfully connecting to Eustis. You are ready to run your first C program through the command line, but before you do that you need to create the actual source file with C code. Therefore, on your local machine (i.e., not on Eustis) download the C file template below and name it smallprogram0_firstname_lastname.c
. You must include the underscore character ‘_’. Note: firstname and lastname is your last name and first name respectively. Please name it exactly how it is recorded in Webcourses so you can receive a proper grade. You do not need to include your middle name if you have one. For example, Dr. Moran’s file would be name smallprogram0_Kevin_Moran.c
. Naming it incorrectly that doesn’t match in Webcourses will cause the script to not run properly and will result in point deductions!
Step 3: Edit your C Source File on Your Local Machine
Inside your C source file, please add your name to the program prologue as shown below:
//********************************************************
// small-program-0.c
// Author: FirstName LastName
// Date: 9/27/23
// Class: COP 3223H, Professor Moran
// Purpose: This program prints a specific message to the
// command line. The main purpose of this assignment is to
// check and see whether I can connect to the Eustis Server.
// Input: None
//
// Output: (to the command line) A breif Message crafted by
// Dr. Moran to test running a C program on Eustis
// //********************************************************
Step 4: Upload your C Source File to Eustis
Once your source file has been created, it is time to upload to Eustis and run it. The directions for uploading and running C code, please refer to the step by step Eustis tutorial. In order to check your C file has uploaded to Eustis successfully, run the ls
command and see if the file name is displayed to the terminal window. The following figure shows what the terminal window should look like after uploading the C file successfully and running the ls
command.
Info
Note that I have created a couple of folders ~/COP3223H/EustisSetup
to help organize my code for this assignment. In general, you will want to create a folder for each class on Eustis, and then a separate folder for each assignment, to help keep things organized.
Step 5: Compile your C Code on Eustis Using GCC
After you have uploaded your C code to the Eustis server, you can then compile it using the gcc
compiler available on Eustis. If your compiler doesn’t return any warnings or errors, then you have generated a successful executable file that will run your C code properly without crashing. You can use the bash
command below to compile your code, however, be sure to modify the command to match your name.
- I'm a code annotation! You will see me in assignments to help explain code snippets provided by Dr. Moran. For this code snippet
gcc
is the command to invoke the compiler, the-o
argument allows us to provide a name for our executable program,small_program_0
is the name of our executable program after the compilation process finishes, andsmallprogram0_lastname_firstname.c
is the name of the C file that we uploaded to Eustis.
Info
Warnings generated will create an executable, however there are risks of your program crashing while executing.
Step 6: Run Your Executable C Program on Eustis
Now that you have compiled your C program, it is time to run it on Eustis! To do this, you can use the code snippet below, but modify it to match your name.
- Hello again! This is a simple command that runs your executable C program. In the
bash
linux command line, the./
tells the computer to execute a compiled program.
If your program ran correctly, you should see output similar to the following, but with your NID on the command line.
If you see the output above, congrats! You just ran your first C program on Eustis! Please take a screenshot of your output that shows your NID username in the terminal, as you will turn this in as part of the assignment.
Step 7: Testing Your C Code on Eustis
Now we are almost done with this assignment. Next, you will test your C code on the Eustis server by running the Python test script that I have provided you with below. You do not need to read or worry about the contents of the Python file. In fact, you should not edit the Python file in any way as it may corrupt the script from running properly.
First, you should remove the executable file that you created in Step 5. You can do this by running the following bash
command in the directory where your file is located:
- Hello again again! This is a simple command that deletes the executable file that you created previously. The
rm
command will delete whatever file is passed as an argument to it.
The green file in the screenshot below is the one that you want to remove.
After you have deleted your executable file, you will now need to upload the Python file linked above to Eustis. (Please see the Eustis Tutorial to see how to upload files to Eustis). After you upload it, you will need to run the Python file, which you can do via the bash
command below:
- Hello for the last tiem for this assignment! This command invokes the
python
interpreter to run the test program that Dr. Moran wrote. This will test your c program to make sure it is working properly! Dr. Moran wrote these tests in python to make it easier to automate grading.
Once you hit enter, the Python script will run, and you should see one of the following two outputs written to the terminal:
If you received the Happy Face, you have successfully completed this assignment! Please take a screenshot of the terminal window where you received the happy face, as you will turn this in as part of the assignment.
Submission instructions
Submit your Assignment through Webcourses. You will need to submit the following files to receive full credit:
- Your
.c
file that contains your code, named in the proper format specified above. - The necessary screenshot from Step 6.
- The necessary screenshot from Step 7.
Grading Rubric
The grading for this project will be broken down as follows:
- Proper C File Uploaded- (17 points total) - We will make sure that you updated the program prologue with your name, and that you named your file correctly.
- Proper Screenshot of Output on Eusits - (17 points) - We will check your screenshot to ensure that your program produced the correct output.
- Screenshot of Python Test Output - (16 points) - We will check your screenshot of the python program output to ensure that your program passed all tests.