From 7452a9ca4f5f9511b300408062c02a74391dbbb1 Mon Sep 17 00:00:00 2001 From: cdez Date: Wed, 7 Sep 2022 15:36:59 -0700 Subject: [PATCH] Added Files from Local to Repo Added Project 1/Homework 1 and Lab 1. Modified the Lab 2 folder to match conventions. --- Lab01/Console_IO_Utility.c | 589 +++++++++++++++++++++++++++++++ Lab01/Console_IO_Utility.h | 289 ++++++++++++++++ Lab01/Lab_1_prog.exe | Bin 0 -> 46571 bytes Lab01/Lab_Project_1.c | 121 +++++++ Lab01/StandardConstants.h | 53 +++ {Lab2 => Lab02}/Lab_2_Project.c | 112 +++--- PA01_0907/Console_IO_Utility.c | 590 ++++++++++++++++++++++++++++++++ PA01_0907/Console_IO_Utility.h | 289 ++++++++++++++++ PA01_0907/PaymentCalc.exe | Bin 0 -> 46540 bytes PA01_0907/Project_1.c | 178 ++++++++++ PA01_0907/StandardConstants.h | 54 +++ 11 files changed, 2219 insertions(+), 56 deletions(-) create mode 100644 Lab01/Console_IO_Utility.c create mode 100644 Lab01/Console_IO_Utility.h create mode 100644 Lab01/Lab_1_prog.exe create mode 100644 Lab01/Lab_Project_1.c create mode 100644 Lab01/StandardConstants.h rename {Lab2 => Lab02}/Lab_2_Project.c (96%) create mode 100644 PA01_0907/Console_IO_Utility.c create mode 100644 PA01_0907/Console_IO_Utility.h create mode 100644 PA01_0907/PaymentCalc.exe create mode 100644 PA01_0907/Project_1.c create mode 100644 PA01_0907/StandardConstants.h diff --git a/Lab01/Console_IO_Utility.c b/Lab01/Console_IO_Utility.c new file mode 100644 index 0000000..9eddcf3 --- /dev/null +++ b/Lab01/Console_IO_Utility.c @@ -0,0 +1,589 @@ +// Header files included +#include "Console_IO_Utility.h" + +// Function Implementations + +/* +Name: clearLeadingCharacters +Process: Clears all leading non-printable characters from the console stream +Function input/parameters: allow space return (Boolean) +Function output/parameters: none +Function output/returned: first printable character as integer +Device input/keyboard: none +Device output/monitor: none +Dependencies: getchar +*/ +int clearLeadingCharacters( bool allowSpaceReturn ) + { + // initialize data, set input character to getChar, set count to zero + // function: getchar + int intChar = getchar(); + int charCount = 0; + + // loop while non-printable characters and space if not set + // also limits looping to constant limit + while( ( intChar < (int)SPACE + || ( !allowSpaceReturn && intChar == SPACE ) ) + && charCount < MAX_STR_LEN ) + { + // update character count + charCount++; + + // get new input character + // function: getchar + intChar = getchar(); + } + + // return captured character + return intChar; + } + +/* + +Name: getChar +Process: returns next character in stream, + ignores all white space (including SPACE) prior to character +Function input/parameters: flag to accept space (Boolean) +Function output/parameters: none +Function output/returned: one character (char) is returned to calling method +Device input/keyboard: places one or more characters in stream +Device output/monitor: none +Dependencies: getCharFiltered +*/ +char getChar() + { + // initialize variables, set space accept flag to false + bool dontAcceptSpace = false; + + // call filtered function with space accept flag + // function: getCharFiltered + return getCharFiltered( dontAcceptSpace ); + } + +/* +Name: getCharFiltered +Process: returns next character in stream, + ignores non printable characters prior to input character + but may accept space depending on flag +Function input/parameters: flag to accept space (boolean) +Function output/parameters: none +Function output/returned: first printable character or space (if configured) + returned (char) +Device input/keyboard: places one or more characters in stream +Device output/monitor: none +Dependencies: getchar(), clearLeadingCharacters +*/ +char getCharFiltered( bool acceptSpace ) + { + //Initialize variables + int inCharInt; + + // clear leading characters, capture first usable character + // function: clearLeadingCharacters + inCharInt = clearLeadingCharacters( acceptSpace ); + + // check for input character set to end of file + if( inCharInt == EOF ) + { + // return character zero + return '0'; + } + + // return input character as character + return (char)inCharInt; + } + +/* +Name: getInputString +Process: acquires input string from keyboard, if clear white space flag set, + ignores all white space, including space character +Function input/parameters: clear white space control (Boolean) +Function output/parameters: character array (char[]) +Function output/returned: none +Device input/keyboard: user entry of a character stream +Device output/monitor: none +Dependencies: getchar(), clearLeadingCharacters +*/ +void getInputString( char inputArr[], bool clearWhiteSpace ) + { + //Initialize Variables, set character count and index to zero + int charCount = 0; + int index = 0; + int intChar; + + // check for clear white space flag + if( clearWhiteSpace ) + { + // clear leading characters, set flag to ignore space + // function: clearLeadingCharacters + intChar = clearLeadingCharacters( !clearWhiteSpace ); + } + + // otherwise, assume white space flag not set + else + { + // get first character + // function: getchar + intChar = getChar(); + } + + // loop until enter key found, limit loop to constant + while( intChar != (int)NEWLINE_CHAR && charCount < MAX_STR_LEN ) + { + // set current value to array element + inputArr[ index ] = (char)intChar; + + // increment string array index + index++; + + // add null character to end of string array + inputArr[ index ] = NULL_CHAR; + + // increment character count + charCount++; + + // get next character + // function: getchar + intChar = getchar(); + } + } + +/* +Name: printCharacter +Process: prints a single character +Function input/parameters: character to be printed (char) +Function output/parameters: None +Function output/returned: None +Device input/keyboard: None +Device output/monitor: character printed as specified +Dependencies: printCharacters +*/ +void printCharacter( char outputChar ) + { + // initialize number of characters to one + int numberOfChars = 1; + + // print one character + // function: printChars + printCharacters( numberOfChars, outputChar ); + } + +/* +Name: printCharacters +Process: prints given number of characters +Function input/parameters: number of characters (int), + character to be printed (char) +Function output/parameters: None +Function output/returned: None +Device input/keyboard: None +Device output/monitor: Number of specified characters printed +Dependencies: printf +*/ +void printCharacters( int numChars, char outputChar ) + { + // check for reminaing characters to print + if( numChars > 0 ) + { + // print one character + // function: printf + printf( "%c", outputChar ); + + // (recursive) print remaining characters + // function: printChars + printCharacters( numChars - 1, outputChar ); + } + } + +/* +Name: printDouble +Process: simple print double function +Function input/parameters: + outVal - the double value to be output (double) + precision - the number of digits to the right of the decimal point (int) +Function output/parameters: none +Function output/returned: none +Device input: none +Device output/monitor: one double value displayed +Dependencies: printDoubleJustified +*/ +void printDouble( double outVal, int precision ) + { + // initialize variables, set block size to zero and justified to "LEFT" + int blockSize = 0; + char justified[] = "LEFT"; + + // call justified function with specified parameters + // function: printDoubleJustified + printDoubleJustified( outVal, precision, blockSize, justified ); + } + +/* +Name: printDoubleJustified +Process: the precision is set for the double value, then the pre-spaces + and post-spaces are calculated for the requested justification, + and then the pre-spaces are printed, the double value is printed, + and then the post-spaces are printed +Function input/parameters: + outVal - the double value to be output (double) + blockSize - the width of the block within which + to print the integer value (int) + justify - "LEFT," "RIGHT," or "CENTER" justification in block (c-string) +Function output/parameters: none +Function output/returned: none +Device input: none +Device output/monitor: one double value displayed, justified, with precision +Dependencies: formatDouble, printStringJustified +*/ +void printDoubleJustified( double outVal, int precision, + int blockSize, const char* justify ) + { + // initialize variables, create temp string for configuration string + char specStr[ MIN_STR_LEN ]; + + // initialize variables, create temporary output string + char outStr[ MIN_STR_LEN ]; + + // set configuration string with precision value + // function: sprintf + sprintf( specStr, "%s0.%dlf", "%", precision ); + + // set output string + // function: sprintf + sprintf( outStr, specStr, outVal ); + + // print string justified + // function: printStringJustified + printStringJustified( outStr, blockSize, justify ); + } + +/* +Name: printEndline +Process: prints single endline character to end a line or create vertical space +Function input/parameters: none +Function output/parameters: none +Function output/returned: none +Device input: none +Device output/monitor: one endline character output +Dependencies: printf +*/ +void printEndline() + { + // print one newline character + // function: printf + printf( "\n" ); + } + +/* +Name: printEndlines +Process: prints the specified number of endline characters + to end a line and/or create vertical space(s) +Function input/parameters: number of endlines (int) +Function output/parameters: none +Function output/returned: none +Device input: none +Device output/monitor: endline characters output as specified +Dependencies: printEndline +*/ +void printEndlines( int numEndlines ) + { + // check for number of end lines remaining + if( numEndlines > 0 ) + { + // print one endling + // function: printEndline + printEndline(); + + // (recursive) print remaining end lines + printEndlines( numEndlines - 1 ); + } + } + +/* + Name: printInteger + Process: prints integer value +Function input/parameters: outVal - the integer value to be output + Output: None + Device Input: None + Device Output: Integer is displayed as specified + Dependencies: printIntegerJustified + */ +void printInteger( int outVal ) + { + // initialize variables, set block size to zero, justifification to "LEFT" + int blockSize = 0; + char justified[] = "LEFT"; + + // print justified integer with specified parameters + // function: printIntegerJustified + printIntegerJustified( outVal, blockSize, justified ); + } + +/* + Name: printIntegerJustified + Process: prints integer value with the specified justification + within the specified blockSize +Function input/parameters: + outVal - the integer value to be output + blockSize - the width of the block within which + to print the integer value (int) + justify - "LEFT," "RIGHT," or "CENTER" justification in block (c-string) + Output: None + Device Input: None + Device Output: Integer is displayed as specified + Dependencies: sprintf, printStringJustified + */ +void printIntegerJustified( int outVal, int blockSize, const char *justify ) + { + // initialize variables, create temporary output string + char outStr[ MIN_STR_LEN ]; + + // convert integer to string + // function: sprintf + sprintf( outStr, "%d", outVal ); + + // print justified string + // function: printStringJustified + printStringJustified( outStr, blockSize, justify ); + } + +/* +Name: printLongInteger +Process: prints long integer +Function input/Parameters: outVal - the long integer value to be output +Function output/parameters: None +Function output/returned: None +Device Input/keyboard: None +Device Output/Monitor: integer is displayed as specified +Dependencies: printLongIntJustified +*/ +void printLongInteger( long outVal ) + { + // initialize variables, set block size to zero, justification to "LEFT" + int blockSize = 0; + char justified[] = "LEFT"; + + // print justified long integer with specified parameters + // function: printLongIntegerJustified + printLongIntegerJustified( outVal, blockSize, justified ); + } + +/* +Name: printLongIntegerJustified +Process: prints long integer with the specified justification + within the specified blockSize +Function input/Parameters: + outVal - the long integer value to be output + blockSize - the width of the block within which + to print the integer value (int) + justify - "LEFT," "RIGHT," or "CENTER" justification in block (c-string) +Function output/parameters: None +Function output/returned: None +Device Input/keyboard: None +Device Output/Monitor: integer is displayed as specified +Dependencies: sprintf, printStringJustified +*/ +void printLongIntegerJustified( long outVal, + int blockSize, const char *justify ) + { + // initialize variables, create temporary output string + char outStr[ MIN_STR_LEN ]; + + // convert long integer to string + // function: sprintf + sprintf( outStr, "%ld", outVal ); + + // print justified string + // function: printStringJustified + printStringJustified( outStr, blockSize, justify ); + } + +/* + Name: printString + Process: prints string +Function input/parameters: outVal - the string value to be output +Function output/parameters: None +Function output/returned: None +Function input/keyboard: None +Device output/monitor: string is displayed as specified +Dependencies: printStringJustified +*/ +void printString( const char *outStr ) + { + // initialize variables, set block size to zero, justification to "LEFT" + int blockSize = 0; + char justified[] = "LEFT"; + + // print justified string with specified parameters + // function: printStringJustified + printStringJustified( outStr, blockSize, justified ); + } + +/* + Name: printStringJustified + Process: prints string within specified block size + and with specified justification +Function input/parameters: + outVal - the string value to be output + blockSize - the width of the block within which + to print the integer value (int) + justify - "LEFT," "RIGHT," or "CENTER" justification in block (c-string) +Function output/parameters: None +Function output/returned: None +Function input/keyboard: None +Device output/monitor: string is displayed as specified +Dependencies: strlen, strcmp, printCharacters, printf +*/ +void printStringJustified ( const char *outStr, + int blockSize, const char *justify ) + { + // initialize variables, set pre-, post- spaces to zero + int preSpaces = 0, postSpaces = 0, strLength; + + // find length of string + // function: strlen + strLength = strlen( outStr ); + + // check justification for "LEFT" + // function: strcmp + if( strcmp( justify, "LEFT" ) == 0 ) + { + // set post spaces for left justification + postSpaces = blockSize - strLength; + } + + // otherwise, check justification for "RIGHT" + // function: strcmp + else if( strcmp( justify, "RIGHT" ) == 0 ) + { + // set pre spaces for right justification + preSpaces = blockSize - strLength; + } + + // Otherwise, assume "CENTER" justification + else + { + // set pre spaces for centered + preSpaces = blockSize / 2 - strLength / 2; + + // set post spaces for centered + postSpaces = blockSize - strLength - preSpaces; + } + + // print pre spaces + // function: printChars + printCharacters( preSpaces, SPACE ); + + // print string + // function: printf + printf( "%s", outStr ); + + // print post spaces + // function: printChars + printCharacters( postSpaces, SPACE ); + } + +/* +Name: promptForCharacter +Process: prompts user for character, then returns it +Function input/parameters: text to prompt user (c-string) +Function output/parameters: None +Function output/returned: one character (chars +Device input/keyboard: user entry of a character +Device output/monitor: prompt string displayed +Dependencies: printf, getChar +*/ +char promptForCharacter( const char *promptString ) + { + // initialize variables + char outChar; + + // print prompt string + // function: printf + printf( "%s", promptString ); + + // get character from stream + // function: getChar + outChar = (char)getChar(); + + // return captured character + return outChar; + } + +/* +Name: promptForDouble +Process: prompts user for double, then returns it +Function input/parameters: test to prompt user (c-string) +Function output/parameters: None +Function output/returned: value (double) +Device input/keyboard: user entry of an integer value +Device output/monitor: prompt string displayed +Dependencies: printf, scanf + */ +double promptForDouble( const char *promptString ) + { + // initialize variables + double outDouble; + + // print prompt string + // function: printf + printf( "%s", promptString ); + + // get double value + // function: scanf + scanf( "%lf", &outDouble ); + + // return captured double + return outDouble; + } + +/* +Name: promptForInteger +Process: prompts user for integer, then returns it +Function input/parameters: text to prompt user (c-string) +Function output/parameters: none +Function output/returned: integer value (int) +Device input/keyboard: user entry of a double value +Device output/monitor: prompt string displayed +Dependencies: printf, scanf +*/ +int promptForInteger( const char *promptString ) + { + // initialize variables + int outInt; + + // print prompt string + // function: printf + printf( "%s", promptString ); + + // input integer + // function: scanf + scanf( "%d", &outInt ); + + // return captured integer + return outInt; + } + +/* +Name: promptForString +Process: prompts user for string, then returns it +Function input/parameters: text to prompt user (c-string) +Function output/parameters: input string from user(c-string) +Function output/returned: none +Device input/keyboard: user entry of a string value +Device output/monitor: prompt string displayed +Dependencies: printf, getInputString +*/ +void promptForString( const char *promptString, char returnStr[] ) + { + // initialize variables, don't allow white space capture + bool dontClearWhitespace = false; + + // pring prompt string + // function: printf + printf( "%s", promptString ); + + // get input string from user (returned via parameter) + // function: getInputString + getInputString( returnStr, dontClearWhitespace ); + } + diff --git a/Lab01/Console_IO_Utility.h b/Lab01/Console_IO_Utility.h new file mode 100644 index 0000000..465cb2a --- /dev/null +++ b/Lab01/Console_IO_Utility.h @@ -0,0 +1,289 @@ +// Preprocessor directive +#ifndef CONSOLE_IO_UTILITY_H +#define CONSOLE_IO_UTILITY_H + +//Header Files +#include +#include +#include +#include "StandardConstants.h" + +//Global Constants + + // none + +//Function Prototypes + +/* +Name: clearLeadingCharacters +Process: Clears all leading non-printable characters from the console stream +Function input/parameters: allow space return (bool) +Function output/parameters: none +Function output/returned: first printable character as integer +Device input/keyboard: none +Device output/monitor: none +Dependencies: getchar +*/ +int clearLeadingCharacters( bool allowSpaceReturn ); + +/* +Name: getChar +Process: returns next character in stream, + ignores all white space (including SPACE) prior to character +Function input/parameters: flag to accept space (bool) +Function output/parameters: none +Function output/returned: one character (char) is returned to calling method +Device input/keyboard: places one or more characters in stream +Device output/monitor: none +Dependencies: +*/ +char getChar(); + +/* +Name: getCharFiltered +Process: returns next character in stream, + ignores non printable characters prior to input character + but may accept space depending on flag +Function input/parameters: flag to accept space (bool) +Function output/parameters: none +Function output/returned: first printable character or space (if configured) + returned (char) +Device input/keyboard: places one or more characters in stream +Device output/monitor: none +Dependencies: getchar(), clearLeadingCharacters +*/ +char getCharFiltered( bool acceptSpace ); + +/* +Name: getInputString +Process: acquires input string from keyboard, if clear white space flag set, + ignores all white space, including space character +Function input/parameters: clear white space control (bool) +Function output/parameters: character array (char[]) +Function output/returned: none +Device input/keyboard: user entry of a character stream +Device output/monitor: none +Dependencies: getchar(), clearLeadingCharacters +*/ +void getInputString(char inputArr[], bool clearWhiteSpace ); + +/* +Name: printCharacter +Process: prints a single character +Function input/parameters: character to be printed (char) +Function output/parameters: None +Function output/returned: None +Device input/keyboard: None +Device output/monitor: character printed as specified +Dependencies: printCharacters +*/ +void printCharacter( char outputChar ); + +/* +Name: printCharacters +Process: prints given number of characters +Function input/parameters: number of characters (int), + character to be printed (char) +Function output/parameters: None +Function output/returned: None +Device input/keyboard: None +Device output/monitor: Number of specified characters printed +Dependencies: printf +*/ +void printCharacters( int numChars, char outputChar ); + +/* +Name: printDouble +Process: simple print double function +Function input/parameters: + outVal - the double value to be output (double) + precision - the number of digits to the right of the decimal point (int) +Function output/parameters: none +Function output/returned: none +Device input: none +Device output/monitor: one double value displayed +Dependencies: printDoubleJustified +*/ +void printDouble( double outVal, int precision ); + +/* +Name: printDoubleJustified +Process: the precision is set for the double value, then the pre-spaces + and post-spaces are calculated for the requested justification, + and then the pre-spaces are printed, the double value is printed, + and then the post-spaces are printed +Function input/parameters: + outVal - the double value to be output (double) + blockSize - the width of the block within which + to print the integer value (int) + justify - "LEFT," "RIGHT," or "CENTER" justification in block (c-string) +Function output/parameters: none +Function output/returned: none +Device input: none +Device output/monitor: one double value displayed, justified, with precision +Dependencies: formatDouble, printStringJustified +*/ +void printDoubleJustified( double outVal, int precision, + int blockSize, const char* justify ); + +/* +Name: printEndline +Process: prints single endline character to end a line or create vertical space +Function input/parameters: none +Function output/parameters: none +Function output/returned: none +Device input: none +Device output/monitor: one endline character output +Dependencies: printEndline +*/ +void printEndline(); + +/* +Name: printEndlines +Process: prints the specified number of endline characters + to end a line and/or create vertical space(s) +Function input/parameters: number of endlines (int) +Function output/parameters: none +Function output/returned: none +Device input: none +Device output/monitor: endline characters output as specified +Dependencies: printEndline +*/ +void printEndlines( int numEndlines ); + +/* + Name: printInteger + Process: prints integer value + Function input/parameters: outVal - the integer value to be output + Function output/parameters: None + Device Input: None + Device Output: Integer is displayed as specified + Dependencies: printIntegerJustified + */ +void printInteger( int outVal ); + +/* + Name: printIntegerJustified + Process: prints integer value with the specified justification + within the specified blockSize + Function input/parameters: + outVal - the integer value to be output (int) + blockSize - the width of the block within which + to print the integer value (int) + justify - "LEFT," "RIGHT," or "CENTER" justification in block (c-string) + Function output/parameters: none + Device Input: None + Device Output: Integer is displayed as specified + Dependencies: sprintf, printStringJustified + */ +void printIntegerJustified( int outVal, int blockSize, const char *justify ); + +/* +Name: printLongInteger +Process: prints long integer +Function input/Parameters: outVal - the long integer value to be output +Function output/parameters: None +Function output/returned: None +Device Input/keyboard: None +Device Output/Monitor: integer is displayed as specified +Dependencies: printLongIntJustified +*/ +void printLongInteger( long outVal ); + +/* +Name: printLongIntegerJustified +Process: prints long integer with the specified justification + within the specified blockSize +Function Input/Parameters: + outVal - the long integer value to be output (long int) + blockSize - the width of the block within which + to print the integer value (int) + justify - "LEFT," "RIGHT," or "CENTER" justification in block (c-string) +Function output/parameters: None +Function output/returned: None +Device Input/keyboard: None +Device Output/Monitor: integer is displayed as specified +Dependencies: sprintf, printStringJustified +*/ +void printLongIntegerJustified( long outVal, + int blockSize, const char *justify ); + +/* + Name: printString + Process: prints string +Function input/parameters: outVal - the string value to be output +Function output/parameters: None +Function output/returned: None +Function input/keyboard: None +Device output/monitor: string is displayed as specified +Dependencies: printStringJustified +*/ +void printString( const char *outStr ); + +/* + Name: printStringJustified + Process: prints string within specified block size + and with specified justification +Function input/parameters: + outStr - the string value to be output (c-string) + blockSize - the width of the block within which + to print the integer value (int) + justify - "LEFT," "RIGHT," or "CENTER" justification in block (c-string) +Function output/parameters: None +Function output/returned: None +Function input/keyboard: None +Device output/monitor: string is displayed as specified +Dependencies: strlen, strcmp, printCharacters, printf +*/ +void printStringJustified( const char *outStr, + int blockSize, const char *justify ); + +/* +Name: promptForCharacter +Process: prompts user for character, then returns it +Function input/parameters: text to prompt user (c-string) +Function output/parameters: None +Function output/returned: one character (chars +Device input/keyboard: user entry of a character +Device output/monitor: prompt string displayed +Dependencies: printf, getChar +*/ +char promptForCharacter( const char *promptString ); + +/* +Name: promptForDouble +Process: prompts user for double, then returns it +Function input/parameters: test to prompt user (c-string) +Function output/parameters: None +Function output/returned: value (double) +Device input/keyboard: user entry of an integer value +Device output/monitor: prompt string displayed +Dependencies: printf, scanf + */ +double promptForDouble( const char *promptString ); + +/* +Name: promptForInteger +Process: prompts user for integer, then returns it +Function input/parameters: text to prompt user (c-string) +Function output/parameters: none +Function output/returned: integer value (int) +Device input/keyboard: user entry of a double value +Device output/monitor: prompt string displayed +Dependencies: printf, scanf +*/ +int promptForInteger( const char *promptString ); + +/* +Name: promptForString +Process: prompts user for string, then returns it +Function input/parameters: text to prompt user (c-string) +Function output/parameters: input string captured (c-string) +Function output/returned: none +Device input/keyboard: user entry of a string value +Device output/monitor: prompt string displayed +Dependencies: printf, getInputString +*/ +void promptForString( const char *promptString, char returnStr[] ); + +#endif // end CONSOLE_IO_UTILITY_H \ No newline at end of file diff --git a/Lab01/Lab_1_prog.exe b/Lab01/Lab_1_prog.exe new file mode 100644 index 0000000000000000000000000000000000000000..fd1eb0778da419de710a06cf5ca19aab93c0c3f2 GIT binary patch literal 46571 zcmeIb3t&{$wKu-!5i*dFNgyaH>PQ2ELLdkTHfSc3$wTro4;~60@|Zv*FEeL&DH1vp z%lXE5>AiaEy|uR@w&nBM%5AxkT1o@K1eI!_v{FHfN_AqWrWScx=l@%KpEGApCeZuu z|Ng)4e&6-LnX~uWYpuQ3+H0@9&pzku6y3X(Sr}thoZ&EIyK$u>i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Lab_Project_1.c @@ -0,0 +1,121 @@ +// header files +#include "Console_IO_Utility.h" +#include +#include + +// global constants +const double PERCENTAGE_CONVERSION = .01; + +const int FOUR_DIGITS = 4; +const int MONTHS_IN_YEAR = 12; +const int TWO_DIGITS = 2; +const int TWO_ENDLINES = 2; + +const char PERCENT_CHAR = '%'; + +// prototypes + // none + +// main program +int main() + { + // initialize function/variables + + // initialize variables + double borrowedAmount, monthlyInterestRate; + double paymentNumerator, paymentDenominator; + double monthlyPayment; + int numMonths; + + // show title + // function: printString, printEndline(s) + printEndline(); + printString( "Monthly Payment Calculator" ); + printEndline(); + printString( "==========================" ); + printEndlines( TWO_ENDLINES ); + + // get input + + // show data entry + // function: printString, printEndline(s) + printString( "Data Entry" ); + printEndline(); + printString( "----------" ); + printEndlines( TWO_ENDLINES); + + // get borrowed amount + // function: promptForDouble + borrowedAmount + = promptForDouble( "Enter the borrowed amount ($): " ); + + // get monthly interest rate + // function: promptForDouble + monthlyInterestRate + = promptForDouble( "Enter the monthly interest rate(%): " ); + + // get number of months + // function: promptForInteger + numMonths = promptForInteger( "Enter the number of months (M): " ); + + // process data, calculate payment + + // calculate payment numerator + monthlyInterestRate = monthlyInterestRate * PERCENTAGE_CONVERSION; + //paymentNumerator = borrowedAmount * (monthlyInterestRate * (pow((1+monthlyInterestRate), numMonths))); + paymentNumerator = (1.0 + pow(monthlyInterestRate, numMonths)); + + // calculate payment denominator + // function: pow + paymentDenominator = (1.0 + pow(monthlyInterestRate, numMonths))-1.0; + + // calculate payment + monthlyPayment = borrowedAmount * monthlyInterestRate * (paymentNumerator / paymentDenominator); + + // show results + + // show title + // functions: printString, printEndline(s) + printEndline(); + printString( "Calculation Results" ); + printEndline(); + printString( "-------------------" ); + printEndline(); + + // show borrowed amount + // functions: printString, printDouble, printEndline(s) + printEndline(); + printString( "Total Borrowed Amount : $" ); + printDouble( borrowedAmount, TWO_DIGITS ); + printEndline(); + + // show monthly interest rate + // functions: printString, printDouble, printCharacter, printEndline(s) + printEndline(); + printString( "Monthly Interest Rate : " ); + printDouble( monthlyInterestRate, FOUR_DIGITS ); + printCharacter( PERCENT_CHAR ); + printEndline(); + + // show monthly payment + // functions: printString, printDouble, printEndline(s) + printEndline(); + printString( "Monthly Payment : $" ); + printDouble( monthlyPayment, TWO_DIGITS ); + printEndline(); + + // end program + + // show end program + // function: printString, printEndline + printEndline(); + printString( "End Program" ); + printEndline(); + + // return program success + return 0; + } + + +// supporting functions + // none diff --git a/Lab01/StandardConstants.h b/Lab01/StandardConstants.h new file mode 100644 index 0000000..4f6f4ec --- /dev/null +++ b/Lab01/StandardConstants.h @@ -0,0 +1,53 @@ +// Preprocessor directives +#ifndef STANDARD_CONSTANTS_H +#define STANDARD_CONSTANTS_H + +// Include Boolean +#include + +// global constants + +// constant for end of c-string null character +#define CARRIAGE_RETURN_CHAR '\r' + +//constant for a COLON +#define COLON ':' + +//constant for a COMMA +#define COMMA ',' + +//Constant to print a dash +#define DASH '-' + +// constant for huge string length +#define HUGE_STR_LEN 256 + +// constant for end of c-string null character +#define NEWLINE_CHAR '\n' + +// constant for small string length +#define MIN_STR_LEN 32 + +// constant for maximum string length +#define MAX_STR_LEN 128 + +// constant for end of c-string null character +#define NULL_CHAR '\0' + +//Constant for printing a pipe +#define PIPE '|' + +//Constant for a period +#define PERIOD '.' + +//Constant for PRECISION +#define PRECISION 2 + +// constant for space character +#define SPACE ' ' + +// constant for standard string length +#define STD_STR_LEN 64 + +#endif // STANDARD_CONSTANTS + diff --git a/Lab2/Lab_2_Project.c b/Lab02/Lab_2_Project.c similarity index 96% rename from Lab2/Lab_2_Project.c rename to Lab02/Lab_2_Project.c index 8235853..92f2f72 100644 --- a/Lab2/Lab_2_Project.c +++ b/Lab02/Lab_2_Project.c @@ -1,57 +1,57 @@ -// This is lab2 for CS136L -// By Andrew Angus and Charles Descamps - -// include files -#include "Console_IO_Utility.h" -#include "StandardConstants.h" - -//global constants - // this constant is to adjust input to accomodate the 0.45 rounding -const double CHANGE_IN_DECIMAL = 0.55; -const int MULTIPLE_LINE_SPACES = 2; -const int LENGTH_OF_SEPERATOR = 16; - -// main program -int main() - { - - // initialize variables - double valueToRound; - - // prints the intro - printEndline(); - - // need to print the title of the program. - printString("Rounding Program"); - - // prints another blank line - printEndline(); - - // also print a separator (16 equal signs) - printCharacters(LENGTH_OF_SEPERATOR, '='); - - // another blank line - printEndlines(MULTIPLE_LINE_SPACES); - - // Ask user for the value to round - valueToRound = promptForDouble("Enter a value to be rounded: "); - - // Round the value by adding change in decimal, then round - valueToRound += CHANGE_IN_DECIMAL; - valueToRound = (int)valueToRound; - valueToRound = (double)valueToRound; - - // print out the rounded value - printString("The rounded value is now: "); - printDouble(valueToRound, PRECISION); - - // print another blank line - printEndlines(MULTIPLE_LINE_SPACES); - - // Print "Program End" - printString("Program End"); - - // print another new line. - printEndline(); - +// This is lab2 for CS136L +// By Andrew Angus and Charles Descamps + +// include files +#include "Console_IO_Utility.h" +#include "StandardConstants.h" + +//global constants + // this constant is to adjust input to accomodate the 0.45 rounding +const double CHANGE_IN_DECIMAL = 0.55; +const int MULTIPLE_LINE_SPACES = 2; +const int LENGTH_OF_SEPERATOR = 16; + +// main program +int main() + { + + // initialize variables + double valueToRound; + + // prints the intro + printEndline(); + + // need to print the title of the program. + printString("Rounding Program"); + + // prints another blank line + printEndline(); + + // also print a separator (16 equal signs) + printCharacters(LENGTH_OF_SEPERATOR, '='); + + // another blank line + printEndlines(MULTIPLE_LINE_SPACES); + + // Ask user for the value to round + valueToRound = promptForDouble("Enter a value to be rounded: "); + + // Round the value by adding change in decimal, then round + valueToRound += CHANGE_IN_DECIMAL; + valueToRound = (int)valueToRound; + valueToRound = (double)valueToRound; + + // print out the rounded value + printString("The rounded value is now: "); + printDouble(valueToRound, PRECISION); + + // print another blank line + printEndlines(MULTIPLE_LINE_SPACES); + + // Print "Program End" + printString("Program End"); + + // print another new line. + printEndline(); + } \ No newline at end of file diff --git a/PA01_0907/Console_IO_Utility.c b/PA01_0907/Console_IO_Utility.c new file mode 100644 index 0000000..38b9f46 --- /dev/null +++ b/PA01_0907/Console_IO_Utility.c @@ -0,0 +1,590 @@ +// Header files included +#include "Console_IO_Utility.h" + +// Function Implementations + +/* +Name: clearLeadingCharacters +Process: Clears all leading non-printable characters from the console stream +Function input/parameters: allow space return (Boolean) +Function output/parameters: none +Function output/returned: first printable character as integer +Device input/keyboard: none +Device output/monitor: none +Dependencies: getchar +*/ +int clearLeadingCharacters( bool allowSpaceReturn ) + { + // initialize data, set input character to getChar, set count to zero + // function: getchar + int intChar = getchar(); + int charCount = 0; + + // loop while non-printable characters and space if not set + // also limits looping to constant limit + while( ( intChar < (int)SPACE + || ( !allowSpaceReturn && intChar == SPACE ) ) + && charCount < MAX_STR_LEN ) + { + // update character count + charCount++; + + // get new input character + // function: getchar + intChar = getchar(); + } + + // return captured character + return intChar; + } + +/* + +Name: getChar +Process: returns next character in stream, + ignores all white space (including SPACE) prior to character +Function input/parameters: flag to accept space (Boolean) +Function output/parameters: none +Function output/returned: one character (char) is returned to calling method +Device input/keyboard: places one or more characters in stream +Device output/monitor: none +Dependencies: getCharFiltered +*/ +char getChar() + { + // initialize variables, set space accept flag to false + bool dontAcceptSpace = false; + + // call filtered function with space accept flag + // function: getCharFiltered + return getCharFiltered( dontAcceptSpace ); + } + +/* +Name: getCharFiltered +Process: returns next character in stream, + ignores non printable characters prior to input character + but may accept space depending on flag +Function input/parameters: flag to accept space (boolean) +Function output/parameters: none +Function output/returned: first printable character or space (if configured) + returned (char) +Device input/keyboard: places one or more characters in stream +Device output/monitor: none +Dependencies: getchar(), clearLeadingCharacters +*/ +char getCharFiltered( bool acceptSpace ) + { + //Initialize variables + int inCharInt; + + // clear leading characters, capture first usable character + // function: clearLeadingCharacters + inCharInt = clearLeadingCharacters( acceptSpace ); + + // check for input character set to end of file + if( inCharInt == EOF ) + { + // return character zero + return '0'; + } + + // return input character as character + return (char)inCharInt; + } + +/* +Name: getInputString +Process: acquires input string from keyboard, if clear white space flag set, + ignores all white space, including space character +Function input/parameters: clear white space control (Boolean) +Function output/parameters: character array (char[]) +Function output/returned: none +Device input/keyboard: user entry of a character stream +Device output/monitor: none +Dependencies: getchar(), clearLeadingCharacters +*/ +void getInputString( char inputArr[], bool clearWhiteSpace ) + { + //Initialize Variables, set character count and index to zero + int charCount = 0; + int index = 0; + int intChar; + + // check for clear white space flag + if( clearWhiteSpace ) + { + // clear leading characters, set flag to ignore space + // function: clearLeadingCharacters + intChar = clearLeadingCharacters( !clearWhiteSpace ); + } + + // otherwise, assume white space flag not set + else + { + // get first character + // function: getchar + intChar = getChar(); + } + + // loop until enter key found, limit loop to constant + while( intChar != (int)NEWLINE_CHAR && charCount < MAX_STR_LEN ) + { + // set current value to array element + inputArr[ index ] = (char)intChar; + + // increment string array index + index++; + + // add null character to end of string array + inputArr[ index ] = NULL_CHAR; + + // increment character count + charCount++; + + // get next character + // function: getchar + intChar = getchar(); + } + } + +/* +Name: printCharacter +Process: prints a single character +Function input/parameters: character to be printed (char) +Function output/parameters: None +Function output/returned: None +Device input/keyboard: None +Device output/monitor: character printed as specified +Dependencies: printCharacters +*/ +void printCharacter( char outputChar ) + { + // initialize number of characters to one + int numberOfChars = 1; + + // print one character + // function: printChars + printCharacters( numberOfChars, outputChar ); + } + +/* +Name: printCharacters +Process: prints given number of characters +Function input/parameters: number of characters (int), + character to be printed (char) +Function output/parameters: None +Function output/returned: None +Device input/keyboard: None +Device output/monitor: Number of specified characters printed +Dependencies: printf +*/ +void printCharacters( int numChars, char outputChar ) + { + // check for reminaing characters to print + if( numChars > 0 ) + { + // print one character + // function: printf + printf( "%c", outputChar ); + + // (recursive) print remaining characters + // function: printChars + printCharacters( numChars - 1, outputChar ); + } + } + +/* +Name: printDouble +Process: simple print double function +Function input/parameters: + outVal - the double value to be output (double) + precision - the number of digits to the right of the decimal point (int) +Function output/parameters: none +Function output/returned: none +Device input: none +Device output/monitor: one double value displayed +Dependencies: printDoubleJustified +*/ +void printDouble( double outVal, int precision ) + { + // initialize variables, set block size to zero and justified to "LEFT" + int blockSize = 0; + char justified[] = "LEFT"; + + // call justified function with specified parameters + // function: printDoubleJustified + printDoubleJustified( outVal, precision, blockSize, justified ); + } + +/* +Name: printDoubleJustified +Process: the precision is set for the double value, then the pre-spaces + and post-spaces are calculated for the requested justification, + and then the pre-spaces are printed, the double value is printed, + and then the post-spaces are printed +Function input/parameters: + outVal - the double value to be output (double) + blockSize - the width of the block within which + to print the integer value (int) + justify - "LEFT," "RIGHT," or "CENTER" justification in block (c-string) +Function output/parameters: none +Function output/returned: none +Device input: none +Device output/monitor: one double value displayed, justified, with precision +Dependencies: formatDouble, printStringJustified +*/ +void printDoubleJustified( double outVal, int precision, + int blockSize, const char* justify ) + { + // initialize variables, create temp string for configuration string + char specStr[ MIN_STR_LEN ]; + + // initialize variables, create temporary output string + char outStr[ MIN_STR_LEN ]; + + // set configuration string with precision value + // function: sprintf + sprintf( specStr, "%s0.%dlf", "%", precision ); + + // set output string + // function: sprintf + sprintf( outStr, specStr, outVal ); + + // print string justified + // function: printStringJustified + printStringJustified( outStr, blockSize, justify ); + } + +/* +Name: printEndline +Process: prints single endline character to end a line or create vertical space +Function input/parameters: none +Function output/parameters: none +Function output/returned: none +Device input: none +Device output/monitor: one endline character output +Dependencies: printf +*/ +void printEndline() + { + // print one newline character + // function: printf + printf( "\n" ); + } + +/* +Name: printEndlines +Process: prints the specified number of endline characters + to end a line and/or create vertical space(s) +Function input/parameters: number of endlines (int) +Function output/parameters: none +Function output/returned: none +Device input: none +Device output/monitor: endline characters output as specified +Dependencies: printEndline +*/ +void printEndlines( int numEndlines ) + { + // check for number of end lines remaining + if( numEndlines > 0 ) + { + // print one endling + // function: printEndline + printEndline(); + + // (recursive) print remaining end lines + printEndlines( numEndlines - 1 ); + } + } + +/* + Name: printInteger + Process: prints integer value +Function input/parameters: outVal - the integer value to be output + Output: None + Device Input: None + Device Output: Integer is displayed as specified + Dependencies: printIntegerJustified + */ +void printInteger( int outVal ) + { + // initialize variables, set block size to zero, justifification to "LEFT" + int blockSize = 0; + char justified[] = "LEFT"; + + // print justified integer with specified parameters + // function: printIntegerJustified + printIntegerJustified( outVal, blockSize, justified ); + } + +/* + Name: printIntegerJustified + Process: prints integer value with the specified justification + within the specified blockSize +Function input/parameters: + outVal - the integer value to be output + blockSize - the width of the block within which + to print the integer value (int) + justify - "LEFT," "RIGHT," or "CENTER" justification in block (c-string) + Output: None + Device Input: None + Device Output: Integer is displayed as specified + Dependencies: sprintf, printStringJustified + */ +void printIntegerJustified( int outVal, int blockSize, const char *justify ) + { + // initialize variables, create temporary output string + char outStr[ MIN_STR_LEN ]; + + // convert integer to string + // function: sprintf + sprintf( outStr, "%d", outVal ); + + // print justified string + // function: printStringJustified + printStringJustified( outStr, blockSize, justify ); + } + +/* +Name: printLongInteger +Process: prints long integer +Function input/Parameters: outVal - the long integer value to be output +Function output/parameters: None +Function output/returned: None +Device Input/keyboard: None +Device Output/Monitor: integer is displayed as specified +Dependencies: printLongIntJustified +*/ +void printLongInteger( long outVal ) + { + // initialize variables, set block size to zero, justification to "LEFT" + int blockSize = 0; + char justified[] = "LEFT"; + + // print justified long integer with specified parameters + // function: printLongIntegerJustified + printLongIntegerJustified( outVal, blockSize, justified ); + } + +/* +Name: printLongIntegerJustified +Process: prints long integer with the specified justification + within the specified blockSize +Function input/Parameters: + outVal - the long integer value to be output + blockSize - the width of the block within which + to print the integer value (int) + justify - "LEFT," "RIGHT," or "CENTER" justification in block (c-string) +Function output/parameters: None +Function output/returned: None +Device Input/keyboard: None +Device Output/Monitor: integer is displayed as specified +Dependencies: sprintf, printStringJustified +*/ +void printLongIntegerJustified( long outVal, + int blockSize, const char *justify ) + { + // initialize variables, create temporary output string + char outStr[ MIN_STR_LEN ]; + + // convert long integer to string + // function: sprintf + sprintf( outStr, "%ld", outVal ); + + // print justified string + // function: printStringJustified + printStringJustified( outStr, blockSize, justify ); + } + +/* + Name: printString + Process: prints string +Function input/parameters: outVal - the string value to be output +Function output/parameters: None +Function output/returned: None +Function input/keyboard: None +Device output/monitor: string is displayed as specified +Dependencies: printStringJustified +*/ +void printString( const char *outStr ) + { + // initialize variables, set block size to zero, justification to "LEFT" + int blockSize = 0; + char justified[] = "LEFT"; + + // print justified string with specified parameters + // function: printStringJustified + printStringJustified( outStr, blockSize, justified ); + } + +/* + Name: printStringJustified + Process: prints string within specified block size + and with specified justification +Function input/parameters: + outVal - the string value to be output + blockSize - the width of the block within which + to print the integer value (int) + justify - "LEFT," "RIGHT," or "CENTER" justification in block (c-string) +Function output/parameters: None +Function output/returned: None +Function input/keyboard: None +Device output/monitor: string is displayed as specified +Dependencies: strlen, strcmp, printCharacters, printf +*/ +void printStringJustified ( const char *outStr, + int blockSize, const char *justify ) + { + // initialize variables, set pre-, post- spaces to zero + int preSpaces = 0, postSpaces = 0, strLength; + + // find length of string + // function: strlen + strLength = strlen( outStr ); + + // check justification for "LEFT" + // function: strcmp + if( strcmp( justify, "LEFT" ) == 0 ) + { + // set post spaces for left justification + postSpaces = blockSize - strLength; + } + + // otherwise, check justification for "RIGHT" + // function: strcmp + else if( strcmp( justify, "RIGHT" ) == 0 ) + { + // set pre spaces for right justification + preSpaces = blockSize - strLength; + } + + // Otherwise, assume "CENTER" justification + else + { + // set pre spaces for centered + preSpaces = blockSize / 2 - strLength / 2; + + // set post spaces for centered + postSpaces = blockSize - strLength - preSpaces; + } + + // print pre spaces + // function: printChars + printCharacters( preSpaces, SPACE ); + + // print string + // function: printf + printf( "%s", outStr ); + + // print post spaces + // function: printChars + printCharacters( postSpaces, SPACE ); + } + +/* +Name: promptForCharacter +Process: prompts user for character, then returns it +Function input/parameters: text to prompt user (c-string) +Function output/parameters: None +Function output/returned: one character (chars +Device input/keyboard: user entry of a character +Device output/monitor: prompt string displayed +Dependencies: printf, getChar +*/ +char promptForCharacter( const char *promptString ) + { + // initialize variables + char outChar; + + // print prompt string + // function: printf + printf( "%s", promptString ); + + // get character from stream + // function: getChar + outChar = (char)getChar(); + + // return captured character + return outChar; + } + +/* +Name: promptForDouble +Process: prompts user for double, then returns it +Function input/parameters: test to prompt user (c-string) +Function output/parameters: None +Function output/returned: value (double) +Device input/keyboard: user entry of an integer value +Device output/monitor: prompt string displayed +Dependencies: printf, scanf + */ +double promptForDouble( const char *promptString ) + { + // initialize variables + double outDouble; + + // print prompt string + // function: printf + printf( "%s", promptString ); + + // get double value + // function: scanf + scanf( "%lf", &outDouble ); + + // return captured double + return outDouble; + } + +/* +Name: promptForInteger +Process: prompts user for integer, then returns it +Function input/parameters: text to prompt user (c-string) +Function output/parameters: none +Function output/returned: integer value (int) +Device input/keyboard: user entry of a double value +Device output/monitor: prompt string displayed +Dependencies: printf, scanf +*/ +int promptForInteger( const char *promptString ) + { + // initialize variables + int outInt; + + // print prompt string + // function: printf + printf( "%s", promptString ); + + // input integer + // function: scanf + scanf( "%d", &outInt ); + + // return captured integer + return outInt; + } + +/* +Name: promptForString +Process: prompts user for string, then returns it +Function input/parameters: text to prompt user (c-string) +Function output/parameters: input string from user(c-string) +Function output/returned: none +Device input/keyboard: user entry of a string value +Device output/monitor: prompt string displayed +Dependencies: printf, getInputString +*/ +void promptForString( const char *promptString, char returnStr[] ) + { + // initialize variables, don't allow white space capture + bool dontClearWhitespace = false; + + // pring prompt string + // function: printf + printf( "%s", promptString ); + + // get input string from user (returned via parameter) + // function: getInputString + getInputString( returnStr, dontClearWhitespace ); + } + + diff --git a/PA01_0907/Console_IO_Utility.h b/PA01_0907/Console_IO_Utility.h new file mode 100644 index 0000000..cb76f1c --- /dev/null +++ b/PA01_0907/Console_IO_Utility.h @@ -0,0 +1,289 @@ +// Preprocessor directive +#ifndef CONSOLE_IO_UTILITY_H +#define CONSOLE_IO_UTILITY_H + +//Header Files +#include +#include +#include +#include "StandardConstants.h" + +//Global Constants + + // none + +//Function Prototypes + +/* +Name: clearLeadingCharacters +Process: Clears all leading non-printable characters from the console stream +Function input/parameters: allow space return (bool) +Function output/parameters: none +Function output/returned: first printable character as integer +Device input/keyboard: none +Device output/monitor: none +Dependencies: getchar +*/ +int clearLeadingCharacters( bool allowSpaceReturn ); + +/* +Name: getChar +Process: returns next character in stream, + ignores all white space (including SPACE) prior to character +Function input/parameters: flag to accept space (bool) +Function output/parameters: none +Function output/returned: one character (char) is returned to calling method +Device input/keyboard: places one or more characters in stream +Device output/monitor: none +Dependencies: +*/ +char getChar(); + +/* +Name: getCharFiltered +Process: returns next character in stream, + ignores non printable characters prior to input character + but may accept space depending on flag +Function input/parameters: flag to accept space (bool) +Function output/parameters: none +Function output/returned: first printable character or space (if configured) + returned (char) +Device input/keyboard: places one or more characters in stream +Device output/monitor: none +Dependencies: getchar(), clearLeadingCharacters +*/ +char getCharFiltered( bool acceptSpace ); + +/* +Name: getInputString +Process: acquires input string from keyboard, if clear white space flag set, + ignores all white space, including space character +Function input/parameters: clear white space control (bool) +Function output/parameters: character array (char[]) +Function output/returned: none +Device input/keyboard: user entry of a character stream +Device output/monitor: none +Dependencies: getchar(), clearLeadingCharacters +*/ +void getInputString(char inputArr[], bool clearWhiteSpace ); + +/* +Name: printCharacter +Process: prints a single character +Function input/parameters: character to be printed (char) +Function output/parameters: None +Function output/returned: None +Device input/keyboard: None +Device output/monitor: character printed as specified +Dependencies: printCharacters +*/ +void printCharacter( char outputChar ); + +/* +Name: printCharacters +Process: prints given number of characters +Function input/parameters: number of characters (int), + character to be printed (char) +Function output/parameters: None +Function output/returned: None +Device input/keyboard: None +Device output/monitor: Number of specified characters printed +Dependencies: printf +*/ +void printCharacters( int numChars, char outputChar ); + +/* +Name: printDouble +Process: simple print double function +Function input/parameters: + outVal - the double value to be output (double) + precision - the number of digits to the right of the decimal point (int) +Function output/parameters: none +Function output/returned: none +Device input: none +Device output/monitor: one double value displayed +Dependencies: printDoubleJustified +*/ +void printDouble( double outVal, int precision ); + +/* +Name: printDoubleJustified +Process: the precision is set for the double value, then the pre-spaces + and post-spaces are calculated for the requested justification, + and then the pre-spaces are printed, the double value is printed, + and then the post-spaces are printed +Function input/parameters: + outVal - the double value to be output (double) + blockSize - the width of the block within which + to print the integer value (int) + justify - "LEFT," "RIGHT," or "CENTER" justification in block (c-string) +Function output/parameters: none +Function output/returned: none +Device input: none +Device output/monitor: one double value displayed, justified, with precision +Dependencies: formatDouble, printStringJustified +*/ +void printDoubleJustified( double outVal, int precision, + int blockSize, const char* justify ); + +/* +Name: printEndline +Process: prints single endline character to end a line or create vertical space +Function input/parameters: none +Function output/parameters: none +Function output/returned: none +Device input: none +Device output/monitor: one endline character output +Dependencies: printEndline +*/ +void printEndline(); + +/* +Name: printEndlines +Process: prints the specified number of endline characters + to end a line and/or create vertical space(s) +Function input/parameters: number of endlines (int) +Function output/parameters: none +Function output/returned: none +Device input: none +Device output/monitor: endline characters output as specified +Dependencies: printEndline +*/ +void printEndlines( int numEndlines ); + +/* + Name: printInteger + Process: prints integer value + Function input/parameters: outVal - the integer value to be output + Function output/parameters: None + Device Input: None + Device Output: Integer is displayed as specified + Dependencies: printIntegerJustified + */ +void printInteger( int outVal ); + +/* + Name: printIntegerJustified + Process: prints integer value with the specified justification + within the specified blockSize + Function input/parameters: + outVal - the integer value to be output (int) + blockSize - the width of the block within which + to print the integer value (int) + justify - "LEFT," "RIGHT," or "CENTER" justification in block (c-string) + Function output/parameters: none + Device Input: None + Device Output: Integer is displayed as specified + Dependencies: sprintf, printStringJustified + */ +void printIntegerJustified( int outVal, int blockSize, const char *justify ); + +/* +Name: printLongInteger +Process: prints long integer +Function input/Parameters: outVal - the long integer value to be output +Function output/parameters: None +Function output/returned: None +Device Input/keyboard: None +Device Output/Monitor: integer is displayed as specified +Dependencies: printLongIntJustified +*/ +void printLongInteger( long outVal ); + +/* +Name: printLongIntegerJustified +Process: prints long integer with the specified justification + within the specified blockSize +Function Input/Parameters: + outVal - the long integer value to be output (long int) + blockSize - the width of the block within which + to print the integer value (int) + justify - "LEFT," "RIGHT," or "CENTER" justification in block (c-string) +Function output/parameters: None +Function output/returned: None +Device Input/keyboard: None +Device Output/Monitor: integer is displayed as specified +Dependencies: sprintf, printStringJustified +*/ +void printLongIntegerJustified( long outVal, + int blockSize, const char *justify ); + +/* + Name: printString + Process: prints string +Function input/parameters: outVal - the string value to be output +Function output/parameters: None +Function output/returned: None +Function input/keyboard: None +Device output/monitor: string is displayed as specified +Dependencies: printStringJustified +*/ +void printString( const char *outStr ); + +/* + Name: printStringJustified + Process: prints string within specified block size + and with specified justification +Function input/parameters: + outStr - the string value to be output (c-string) + blockSize - the width of the block within which + to print the integer value (int) + justify - "LEFT," "RIGHT," or "CENTER" justification in block (c-string) +Function output/parameters: None +Function output/returned: None +Function input/keyboard: None +Device output/monitor: string is displayed as specified +Dependencies: strlen, strcmp, printCharacters, printf +*/ +void printStringJustified( const char *outStr, + int blockSize, const char *justify ); + +/* +Name: promptForCharacter +Process: prompts user for character, then returns it +Function input/parameters: text to prompt user (c-string) +Function output/parameters: None +Function output/returned: one character (chars +Device input/keyboard: user entry of a character +Device output/monitor: prompt string displayed +Dependencies: printf, getChar +*/ +char promptForCharacter( const char *promptString ); + +/* +Name: promptForDouble +Process: prompts user for double, then returns it +Function input/parameters: test to prompt user (c-string) +Function output/parameters: None +Function output/returned: value (double) +Device input/keyboard: user entry of an integer value +Device output/monitor: prompt string displayed +Dependencies: printf, scanf + */ +double promptForDouble( const char *promptString ); + +/* +Name: promptForInteger +Process: prompts user for integer, then returns it +Function input/parameters: text to prompt user (c-string) +Function output/parameters: none +Function output/returned: integer value (int) +Device input/keyboard: user entry of a double value +Device output/monitor: prompt string displayed +Dependencies: printf, scanf +*/ +int promptForInteger( const char *promptString ); + +/* +Name: promptForString +Process: prompts user for string, then returns it +Function input/parameters: text to prompt user (c-string) +Function output/parameters: input string captured (c-string) +Function output/returned: none +Device input/keyboard: user entry of a string value +Device output/monitor: prompt string displayed +Dependencies: printf, getInputString +*/ +void promptForString( const char *promptString, char returnStr[] ); + +#endif // end CONSOLE_IO_UTILITY_H diff --git a/PA01_0907/PaymentCalc.exe b/PA01_0907/PaymentCalc.exe new file mode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Pj@r` literal 0 HcmV?d00001 diff --git a/PA01_0907/Project_1.c b/PA01_0907/Project_1.c new file mode 100644 index 0000000..09e578b --- /dev/null +++ b/PA01_0907/Project_1.c @@ -0,0 +1,178 @@ +// header files +#include "Console_IO_Utility.h" +#include +#include + +// global constants +const double PERCENTAGE_CONVERSION = .01; + +const int MONTHS_IN_YEAR = 12; +const int TWO_DIGITS = 2; +const int TWO_ENDLINES = 2; + +const char PERCENT_CHAR = '%'; + +// prototypes + // none + +// main program +int main() + { + // initialize function/variables + + // initialize variables + double purchasePrice, downPayment, interestRate, borrowedAmount; + double monthlyInterest, paymentNumerator, paymentDenominator; + double monthlyPayment, totalOfPayments, interestPaid, totalPurchasePrice; + int numYears, numPayments; + + // show title + // function: printString, printEndline(s) + printEndline(); + printString( "Monthly Payment Calculator" ); + printEndline(); + printString( "==========================" ); + printEndlines( TWO_ENDLINES ); + + // get input + + // show data entry + // function: printString, printEndline(s) + printString( "Data Entry" ); + printEndline(); + printString( "----------" ); + printEndlines( TWO_ENDLINES); + + // get purchase price + // function: promptForDouble + purchasePrice = promptForDouble( "Enter the purchase price ($): " ); + + // get down payment + // function: promptForDouble + downPayment = promptForDouble( "Enter the down payment ($): " ); + + // get annual interest rate + // function: promptForDouble + interestRate = promptForDouble( "Enter the annual interest rate (%): " ); + + // get number of years + // function: promptForInteger + numYears = promptForInteger( "Enter the number of years (Y): " ); + + // COMPLETE: process data, calculate payment + + // calculate borrowed amount (aka principal), + // using the purchasePrice and subtract the downPayment. + borrowedAmount = purchasePrice - downPayment; + + // calculate monthly interest, dividing the annual interest rate by 12. + monthlyInterest = (interestRate*PERCENTAGE_CONVERSION) / MONTHS_IN_YEAR; + + // calculate number of payments, using years times 12 for num payments. + numPayments = numYears * MONTHS_IN_YEAR; + + // calculate payment numerator, using mortgage equation + paymentNumerator = pow((1.0 + monthlyInterest), numPayments); + + // calculate payment denominator, using mortgage equation + // function: pow + paymentDenominator = pow((1.0 + monthlyInterest), numPayments) - 1.0; + + // calculate payment, dividing the rest of the loan between months. + monthlyPayment = (borrowedAmount * monthlyInterest) + * (paymentNumerator/paymentDenominator); + + // calculate total of all payments, + // multiply the monthly payment by the amount of payments + totalOfPayments = monthlyPayment * numPayments; + + // calculate interest paid, + // take the total payments and subtract the borrowed amount. + interestPaid = totalOfPayments - borrowedAmount; + + // calculate total purchase price, + // adding the amount of total of all payments, added to down payment. + totalPurchasePrice = totalOfPayments + downPayment; + + // show results + + // show title + // functions: printString, printEndline(s) + printEndline(); + printString( "Calculation Results" ); + printEndline(); + printString( "-------------------" ); + printEndline(); + + // show total purchase price + // functions: printString, printDouble, printEndline(s) + printEndline(); + printString( "Total Principal : $" ); + printDouble( borrowedAmount, TWO_DIGITS ); + printEndline(); + + // show down payment + // functions: printString, printDouble, printEndline(s) + printEndline(); + printString( "Down Payment : $" ); + printDouble( downPayment, TWO_DIGITS ); + printEndline(); + + // show annual interest rate + // functions: printString, printDouble, printCharacter, printEndline(s) + printEndline(); + printString( "Annual Interest Rate : " ); + printDouble( interestRate, TWO_DIGITS ); + printCharacter( PERCENT_CHAR ); + printEndline(); + + // show total number of payments + // functions: printString, printInteger, printEndline(s) + printEndline(); + printString( "Number of Payments : " ); + printInteger( numPayments ); + printEndline(); + + // show monthly payment + // functions: printString, printDouble, printEndline(s) + printEndline(); + printString( "Monthly Payment : $" ); + printDouble( monthlyPayment, TWO_DIGITS ); + printEndline(); + + // show total interest paid + // functions: printString, printDouble, printEndline(s) + printEndline(); + printString( "Total Interest Paid : $" ); + printDouble( interestPaid, TWO_DIGITS ); + printEndline(); + + // show total cost of loan + // functions: printString, printDouble, printEndline(s) + printEndline(); + printString( "Total Cost of Loan : $" ); + printDouble( totalOfPayments, TWO_DIGITS ); + printEndline(); + + // show total purchase price + // functions: printString, printDouble, printEndline(s) + printEndline(); + printString( "Total Purchase Price : $" ); + printDouble( totalPurchasePrice, TWO_DIGITS ); + printEndline(); + + // end program + + // show end program + // function: printString, printEndline + printEndline(); + printString( "End Program" ); + printEndline(); + + // return program success + return 0; + } + + +// supporting functions + // none diff --git a/PA01_0907/StandardConstants.h b/PA01_0907/StandardConstants.h new file mode 100644 index 0000000..5e8819b --- /dev/null +++ b/PA01_0907/StandardConstants.h @@ -0,0 +1,54 @@ +// Preprocessor directives +#ifndef STANDARD_CONSTANTS_H +#define STANDARD_CONSTANTS_H + +// Include Boolean +#include + +// global constants + +// constant for end of c-string null character +#define CARRIAGE_RETURN_CHAR '\r' + +//constant for a COLON +#define COLON ':' + +//constant for a COMMA +#define COMMA ',' + +//Constant to print a dash +#define DASH '-' + +// constant for huge string length +#define HUGE_STR_LEN 256 + +// constant for end of c-string null character +#define NEWLINE_CHAR '\n' + +// constant for small string length +#define MIN_STR_LEN 32 + +// constant for maximum string length +#define MAX_STR_LEN 128 + +// constant for end of c-string null character +#define NULL_CHAR '\0' + +//Constant for printing a pipe +#define PIPE '|' + +//Constant for a period +#define PERIOD '.' + +//Constant for PRECISION +#define PRECISION 2 + +// constant for space character +#define SPACE ' ' + +// constant for standard string length +#define STD_STR_LEN 64 + +#endif // STANDARD_CONSTANTS + +