Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Assignment

1 Encryption Program

In this assignment you will be asked to create several pieces of code to practice programming practices.

The required files you will be creating:

- tar directory.sh
- test encrypt.sh
- encrypt.c
- test encrypt.c
- svn.log
- makeftle

SVN

Subversion is a useful task even at a local level, it allows you to re-store old past version of code just in case you current code is wrong. Another use is project sharing but this becomes more important in future classes.

The objective here is to create a local SVN repository and show that you using this repository for correct use.

1. create the repository

2. create SEPERATE DIRECTORY create your project folder that will contain all your code for this assignment.

3. Check out this your repository to the your project folder.

4. commit,add, update and use the repository

5. submit svn log when handing in assignment 2

Tar file
Tarring is handy tool to have when submitting large projects because of its compressing abilities. As seen by the previous lab assignments, this can be done in a simple command tar but simply tarring everything is DANGEROUS.
For this section of the assignment you will need to create script that does the following:
- tar correct files into a folder
- reads in a user name for the folder
- concatinates your nsid to the end of the folder name
- compress only necessary files: .h,.c,makeftle,.sh,.txt
- DOES not include .svn folder or useless files like .o or executable example use:
marinaSchmidt : . / t a r f o l d e r . sh assig nme nt 2
marinaSchmidt : l s
assignment 2 mts 299 . ta r

Encryption

This is where you will be creating the main program that will encrypt and decrypt strings passed in by the user at execution time. For this assignment you will not be expected to program the whole project just yet, rather you will need to setup an environment that allows for quick testing and well planned functions.

Create encrypt.c that takes in user input from the execution of the program and print back what is taken in then print out the ASCII for of the input.

example:
marinaSchmidt : . / encrypt h e l l o world s t r i n g passed : h e l l o world
ASCII : 85121215 231518124

Note: use printf
hint: look at using argv to read in command line input at execution You will need to create stub functions for future work:
- convert to ascii() Note: you will implementing this function.
- scrambler()
- cipher()
- shifter()

You will need to implement convert to ascii() as well determine what pa- rameters the functions will take in and what they return. Please include sig- natures of each function in the header files and source files. Remember good programming practice is to make things simple and easy to test. Please add any other functions to the list if you see fit but you will need to explain in comments what the purpose of that function is.

Description:
- convert to ascii(): converts standard string format to decimal ascii code.
- scrambler(): moves characters in a string to different location in non linear manner.
- cipher(): applies a mathematical computation to each character to con- vert it to another letter.
- shifter(): adds an offset to each character to shift to another character.
You will need to add more detail on each function in the comment signature to show your plan of implementation.

testing scaffold

To ensure one code works, a user must test each function before starting a new one to ensure no cascading of bugs, this is known as TDD (test driven development).

create test functions for the above function list in separate file called test encrypt.c you will also need a header file such that test file can call those function's to test. Also create int main that calls all the test functions and output which ones failed, passed and any other useful output.

Right now all your tests should fail except convert to ascii. Make sure to record your output of these tests to output file to show it does correct test coverage.

testing script

Sometimes you will need to take in user input to test the program fully, but this can become painful when there is multiple tests to do. Creating a script to take in different input types is a useful and painless method of testing.

Write a script called test encrypt.sh runs your code with various input tests and shows the output of each test. To obtain full marks make the script user reader friendly in understanding if the output was correct or not.

makefile

In the next assignment this code will become big as it will need to include some extra libraries, therefore we need a makefile. Start with creating a makefile that compiles your code into .o object files and executable files. This section will be marked on proper use and format of the makefile.

Remember once you made a good makefile, you will never have to make another one again.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91976293

Have any Question?


Related Questions in Computer Engineering

Good morning im still new and trying to grasp certain

Good Morning. I'm still new and trying to grasp certain aspects of windows server and windows overall. I'm trying to understand what is the importance of windows server update services and windows defender when it comes ...

Suppose that a block can contain at most four data values

Suppose that a block can contain at most four data values and that all data values are integers. Using only B+ trees of degree 2, give examples of each of the following : a. A B+ tree whose height changes from 2 to 3 whe ...

Structureswrite the program in c onlytask create a seating

Structures Write the Program in C++ only. Task: Create a seating reservation program for Podunk Airlines. The air fleet consists of a single plane with a seating capacity of 12. The plane makes one flight daily. Your pro ...

Stacksthere are two main operations associated with stacks1

Stacks There are two main operations associated with stacks; 1) putting things on the stack which is referred to as push, 2) taking things from the stack which is referred to as pop. We can create a stack using linked li ...

Requirementsin this assignment you will implement a

Requirements In this assignment, you will implement a lightweight version of an ArrayList class. You may refer to the Java code and documentation for guidance, but you must write the implementation yourself. Additionally ...

Assignment - confidential organizational information and

Assignment - Confidential Organizational Information and Employee Responsibility As an employee, you are often required to sign confidentiality agreements when beginning work at a new company. You may also be required to ...

Question add referenceswrite 1 page that respond to the

Question: Add References Write 1 page that respond to the following questions with your thoughts, ideas, and comments. This will be the foundation for future discussions by your classmates. Be substantive and clear, and ...

Describe the difference in economic profit between a

Describe the difference in economic profit between a competitive firm and a monopolist in both the short and long run. Which should take longer to reach the long-run equilibrium?

The equation of regression line for sons heighty in inches

The equation of regression line for son's height(y) in inches versus father's height in inches is y = 35 + 0.5x. For a 72 inch tall father, what would we predict for the son's height?

A 200g sample of acetylsalicylic acid better known

A 2.00g sample of acetylsalicylic acid, better known asaspirin, is dissolved in 100mL of water and titrated with 0.200mol/L NaOH(aq) to the end point. The volume of base required is 55.5mL. Calculate the molar mass of ac ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As