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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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