Several pieces of code to practice programming practices

Assignment Help Computer Engineering
Reference no: EM131220350

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.

Reference no: EM131220350

Questions Cloud

What is the return on assets for the company : What is the return on assets for this company? What is the return on common stockholders' equity for this company? If 2016 is the base year, what is the percentage increase in sales from 2016 to 2017?
Regarding audit reports on tax-basis financial statements : What is the correct term for financial statements that are developed from information presented in audited financial statements? Which of the following statements is true regarding audit reports on tax-basis financial statements?
Calculate the speed at which the generator must be run : Calculate the speed at which the generator must be run to generate 300V. - what would be the speed if the generator were if wave-would?
Promise of fiscal responsibility : Scenario: The President of the United States has been elected on the promise of fiscal responsibility. By law he cannot reduce the net interest paid on the debt. The President's budget is projected to leave the country with a $1100B deficit.
Several pieces of code to practice programming practices : Create several pieces of code to practice programming practices - create a local SVN repository and show that you using this repository for correct use and create SEPERATE DIRECTORY create your project folder that will contain all your code for this ..
How would you account for any actions or inactions : How would you account for any actions or inactions taken by the defendant at the time the confession was made? In other words, can you rehabilitate an illegally obtained confession in order to be able to use it at trial?
Explain the concepts of expansion and recession : 1. Define business cycle and explain the concepts of expansion and recession 2. Identify (plot out) using Gapminder World ( https://www.gapminder.org/world/ )the business cycle for the U.S. and any other country of your choice (in the same graph)...
Find the average value of the current : The periodic current waveform of given figure is composed of segments of a sinusoid. Find the average value of the current.
About how corporations account for income tax : Based on what you have learned about how corporations account for income tax, what ethical issues do you think could arise during the process? How might these ethical issues be addressed? Provide an example of an ethical issue you described.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Make a set of powerpoint slides

make a set of PowerPoint slides.

  What role does technology or social media have on how we

1.what role do you think media internet music industry movies or advertising play the development of our self-concept?

  The shortest path distances between the pair

The shortest path distances between the pair

  Why canot a binary search be applied on the list below

Why can't a binary search be applied on the list below?

  Determining the output

Specify the output if input is diamond diamond? State the output if the input is diamond gold?

  Discuss the levels of the cmmi process improvement approach

Discuss the levels of the CMMI process improvement approach. What is Scope and why is it important to a Risk Management Project. What is a Cost Benefit Analysis and Why is it important

  Show how this instruction would be written using rtn

Basically, we are incrementing the operand, and if this new value is equal to 0, we skip the next instruction. Show how this instruction would be written using RTN.

  Show the parse tree for the expression 110

The second grammar is unambiguous. This means that every expression in the language has exacty on parse tree. Show the parse tree for the expression 110.

  Linux advanced server vs windows 2003 server

Please give me 10 topic examples that I can select to write about in my class assignment. The example must be able to cover the directions that are listed below.

  Compute the file directory and fat entries

Using a text editor, create a file that is between 5,000 and 6,000 bytes long on a newly formatted floppy disk. compute the file directory and FAT entries for the type of disk used.

  Describe that applicationspurpose how is it used what

describe that applicationspurpose. how is it used? what changes has it brought about to its users? what are some likely

  How automated accounting software can help management

Summarize the various accounting systems that each firm provides. Be sure to address the following for each firm: a. The various types of accounting systems it sells (e.g., Oracle sells Oracle Financials as well as PeopleSoft financials)

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd