Starting from:
$21.99

$15.99

Final Project Solution

In the previous assignment, you became familiar with vim/emacs/nano, make and gdb. This project extends lessons learned in the previous assignment by adding functionality to your new application. The project functionality that you must implement follows:

PROJECT NAME: You can copy/use Assignment 4 as a template for the project changing the application name to "findName" as a starting point. You might also use the c++ templates provided as a starting point.
INPUT: A CSE userid
Your C++ program must accept the userid as a command line argument.
Your C++ program will pass the userid as a command line argument to a shell script which must execute some code using the userid passed from the program.
OUTPUT: The Full name of the user specified by the input userid.
 

Part I: (7 points). Create a shell script that returns a full name associated with a userid specified in the command line argument.

Your shell script should be named findName.sh
Example:
o    $ ./findName.sh grabasan

o    BILLY T GRABASANDWICH

o    $

Your shell script must either:
Return the full name associated with the userid
or

Return an error message if the command line arguments are not equal to 1.
or

Return the message "Sorry that person is not in CSCE215 course."
No other output is acceptable.

Part II: (8 points) findName program

6.   Create a C++ program that takes a command line argument value (userid) and passes this argument to a shell script. [HINT: system()]

 

7.   As in the previous assignment, modify your makefile to include a rule that creates a backup of the source files, makefile and readme in an archive directory in your home dir structure. Submit an uncompressed tar file named $USER.findname.tar with your modified source code. (ie yourUserid.findname.tar)
Be sure to document your code in a README file.

 

§  In order to obtain credit for your project your submission must react properly to the following commands:

$tar xvf $USER.findname.tar

$make

$./findName someuserid

8.   Your program will be graded based on it's ability to execute the above commands and return one of 3 allowable outputs: 
first middle lastnameorsome error message based on an incorrct number of command line argumentsorthe message stating that the user is not in CSCE215

 

More products