Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A fundamental software engineering skill is the design, implementation, and testing of a software component that may be integrated into a larger software product. In
A fundamental software engineering skill is the design, implementation, and testing of a software component that may be integrated into a larger software product. In order to do this, the software component must conform to a previously agreed upon interface format. As part of this assignment, you will practice this skill by writing several functions that will be integrated into a larger software product provided by the instructor. Along the way you will review basic C programming skills required for successful completion of CPE
For this project, you will complete the provided partial C program by implementing six functions that perform simple image processing operations on images stored as x two dimensional arrays of integers. The image processing operations are:
Load Image
Horizontal Flip
Vertical Flip
Transpose
Rotate deg Clockwise
Rotate deg Counter Clockwise
You must implement each of these operations as a C function. Your code for the six functions above must appear in the file named projectcpp in order to compile correctly. Remember, spelling and capitalization count in LinuxC
The function main has already been implemented for you to provide a common way for everyone to test their code. The function main will scan a sample input file and perform the requested series of image processing operations by invoking your functions as needed.
Prototypes for the six functions are already provided for you in main.cpp do not modify main.cpp All program output is performed by the code in the main.cpp file do not include any output statements in the file projectcpp
The interfaces to each of these functions you must write are described in detail on subsequent pages and in the prototypes listed within main.cpp
Hint: Match the output of your program to that of the sample solution!!!
Directions for running the sample solution appear on the following page.
Running the Sample Solution on blackhawk
The best description of what your code should do is the Sample Solution for the project.
Run the sample solution by typing the following at blackhawk terminal window command prompt
homeworkcpeprojectp imagefilename
NOTE: You may get a permission denied error running the above line. In that case use this copy of the executable: pref. Copy pref to your working directory and type pref pinputtxt Try it with all the input files.
where imagefilename is the name of one of the provided input files for example, pinputtxt Your current working directory must contain the input files for this to work.
Unzipping Sample Input Files on blackhawk
Use the secure copy portion of MobaXterm to copy the projectmaterials.zip file to the Blackhawk server. Make a project directory this will be your working directory and move the projectmaterials.zip file that working directory us the mv command Use unzip to expand the projectmaterials.zip file.
For example: unzip NameOfZipFileHere
to unzip the files into your current directory.
Since this project is worth five points, you have been given five input files which utilize the three image files to test your program.
Running the Preview Script on blackhawk
Run the preview script by typing the following in a blackhawk terminal window command prompt
homeworkcpedataprojectpreviewbash
NOTE: You may get a permission denied error. In that case use this copy of the preview script: previewbash. Run this version without arguments to see how to use it
Usage:
Copy previewbash to your working directory.
Create a directory called "tests".
Copy all the pinput#txt files to the tests directory.
Type previewbash project pinputtxt Try it with all the input files.
Also, this new version is different than the homeworkcpedataprojectpreviewbash. The latter takes no arguments.
This script will run both the Sample Solution AND your project executable program on the complete set of input files, and it compares the outputs of the two programs line by line to identify errors in your program's outputs. Make sure that the output of your program exactly matches the output of the Sample Solution.
This project consists of two C files one named main.cpp provided by the instructor and one named projectcpp written by you, along with a file named makefile to help you compile your program. A makefile contains the sequence of commands required to compile and assemble link your executable program. The provided file works on blackhawk. If you examine the structure of main.cpp you will see an extra #include directive near the end of the file this statement will cause the preprocessor to import the function definitions you have written and saved in the projectcpp file. So for this assignment, all you must do to compile the program is to use the fol
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started