Learn necessary Linux commands
Understand Linux file system
Learn how to compile your program with clang++
Learn how to use Makefiles to build programs
We will talk about:
The UNIX Filesystem
bigint
We need to:
Checkout a directory that has provided files.
Create the directory for the bigint
project.
bigint
in your "Student" Working CopyIt is assumed your working copy is named cs23001 and is in your home directory. If not, adjust the commands as needed.
In the commands below the # and characters that follow are comments, like //
in C++, and do not need to be typed.
Do the following in a terminal:
cd # Go to your home directory
cd cs23001 # Go into the working copy of your programs
pwd # Print working directory, just to show where you're at
ls -l # No bigint
svn mkdir bigint # USE THIS NAME EXACTLY
ls -l # bigint now present
svn commit -m "Directory for bigint program"
There should be no error messages. If there are error messages fix the problem, talk to your instructor if necessary.
You can verify the commit with the browser. Click the following link then replace "USERNAME" with your username in the browser's location bar.
http://svn.cs.kent.edu/courses/cs23001/svn/USERNAME
As a part of your lab assignment, you must complete a quiz in Canvas. This quiz will cover what you learned in the previous lab about Subversion.
You have the entire lab to complete the quiz. You may not complete this quiz outside of your lab.
Create the files necessary for the bigint
type, part 1.
Work on the bigint
project part 1.
Look at the bigint
project page for bigint
project part 1 details.
If you have not done so, carry out the instructions in the Setup section to create the bigint
project directory
Do the following commands in a terminal window.
cd # Go to home folder
svn update ~/shared # Update your shared folder
cd cs23001 # Go to your cs23001/bigint directory
cd bigint
touch bigint.hpp # Create an empty file named bigint.hpp
touch bigint.cpp # Create an empty file named bigint.cpp
svn add bigint.hpp bigint.cpp # Add the files to version control
svn commit -m "Empty start files for bigint project"
Copy the files:
cp ../../shared/project1/* . # The . denotes the current directory
ls -l # You should see additional files
Add the files to your working copy and commit:
svn add Makefile
svn add test_default_ctor.cpp
svn add test_int_ctor.cpp
svn add test_c_str_ctor.cpp
svn add test_equal.cpp
svn commit -m "Provided files"
bigint
Part 1Work on the bigint
project part 1.
First add stubs and get your programs to compile.
Stubs are functions that have one line in the body that returns an arbitrary value so that function declarations and definitions are present.
Use vi
, emacs
, or another editor to edit the files.
Use the provided makefile to build and run your programs.
In a terminal window type make tests
to build and run the programs.
When the programs successfully build implement the required functions so that the tests pass.
Typing make clean
will remove .o files and the executable.
If you have extra time experiment with other UNIX commands and an editor.
Do not hesitate to ask your instructor if you have questions or problems.
The following should be true when you are done, NAMES MUST MATCH EXACTLY:
In your cs23001 directory you have created a directory named bigint.
In the directory bigint you have the following files:
bigint.hpp
bigint.cpp
Makefile
Four test programs
Output demonstration program
The files and directory have been committed.
There are NO executables in the repository.
Your program compiles, runs, and performs as specified using the Makefile.
Your program follows the General Program Requirements.
Use the browser one more time to verify that your work has been committed.
http://svn.cs.kent.edu/courses/cs23001/svn/USERNAME
You can click on the above link then replace "USERNAME" in the browser's location box with your information.
Upon completion of this assignment it will be assumed you are comfortable with the skills used in this assignment.
Do not hesitate to ask your instructor if you have questions or problems.