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

  Assignment program crawler game

Assignment program Crawler game: Update the Crawler game attached to allow a user to traverse the Cave. They should be prompted in each room to pick an exit or quit

  Describe sharepoint services and various sharepoint options

discuss sharepoint services and various sharepoint options as well as windows media rights management to handle the

  Create a set of three priority interrupts

Create a set of three priority interrupts and show how they are executed between times 0 and 80 ns. Only one program or interrupt can run at a time.

  Conduct a comparison of three uml modeling tools of your

conduct a comparison of three uml modeling tools of your choice.your paper should include the following headers and

  How would go about preventing unwanted eyes

the Director of Human Resources has a file documenting the pay rates of all employees. How will you prevent users on the network from actually being able to see the file on that particular workstation.

  Plan an er diagram

Plan an ER diagram

  Find the minimum number of multiplexer and gates

find the minimum number of multiplexer and gates to realize the given function.

  How to choose easy medium or hard problems

End program with the quit button. After that is working, add option buttons to allow the user to select easy medium or hard problems, i.e., numbers between 0 and 9, 0 and 99 or 0 and 999.

  Use a bubble sort algorithm in c++

use a Bubble Sort algorithm in C++ that generates a list of 10 random integers.

  Design an exception class

I need to write downan applet file that prompts the user for an ID number and an age. Create an Exception class and throw an Exception of that class if ID is not in the range of valid ID numbers (zero through 899), or if the age is not in the rang..

  Gve five merits and demerits of partitioning a large hard

question 1 the unix operating system file system uses a file protection structure that differs from the file protection

  Recognize the top-level objects of the microwave

make a table with the following four column headings: Top-Level Objects, Communicates With, Incoming Messages, and Outgoing Messages.

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