Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"configurations": [
{
"name": "linux-gcc-x64",
"includePath": [
"${workspaceFolder}/**"
],
"compilerPath": "/usr/bin/g++",
"cStandard": "${default}",
"cppStandard": "${default}",
"intelliSenseMode": "linux-gcc-x64",
"compilerArgs": [
""
]
}
],
"version": 4
}
24 changes: 24 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "C/C++ Runner: Debug Session",
"type": "cppdbg",
"request": "launch",
"args": [],
"stopAtEntry": false,
"externalConsole": false,
"cwd": "/workspaces/cppFinal",
"program": "/workspaces/cppFinal/build/Debug/outDebug",
"MIMode": "gdb",
"miDebuggerPath": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
59 changes: 59 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"C_Cpp_Runner.cCompilerPath": "gcc",
"C_Cpp_Runner.cppCompilerPath": "g++",
"C_Cpp_Runner.debuggerPath": "gdb",
"C_Cpp_Runner.cStandard": "",
"C_Cpp_Runner.cppStandard": "",
"C_Cpp_Runner.msvcBatchPath": "",
"C_Cpp_Runner.useMsvc": false,
"C_Cpp_Runner.warnings": [
"-Wall",
"-Wextra",
"-Wpedantic",
"-Wshadow",
"-Wformat=2",
"-Wcast-align",
"-Wconversion",
"-Wsign-conversion",
"-Wnull-dereference"
],
"C_Cpp_Runner.msvcWarnings": [
"/W4",
"/permissive-",
"/w14242",
"/w14287",
"/w14296",
"/w14311",
"/w14826",
"/w44062",
"/w44242",
"/w14905",
"/w14906",
"/w14263",
"/w44265",
"/w14928"
],
"C_Cpp_Runner.enableWarnings": true,
"C_Cpp_Runner.warningsAsError": false,
"C_Cpp_Runner.compilerArgs": [],
"C_Cpp_Runner.linkerArgs": [],
"C_Cpp_Runner.includePaths": [],
"C_Cpp_Runner.includeSearch": [
"*",
"**/*"
],
"C_Cpp_Runner.excludeSearch": [
"**/build",
"**/build/**",
"**/.*",
"**/.*/**",
"**/.vscode",
"**/.vscode/**"
],
"C_Cpp_Runner.useAddressSanitizer": false,
"C_Cpp_Runner.useUndefinedSanitizer": false,
"C_Cpp_Runner.useLeakSanitizer": false,
"C_Cpp_Runner.showCompilationTime": false,
"C_Cpp_Runner.useLinkTimeOptimization": false,
"C_Cpp_Runner.msvcSecureNoWarnings": false
}
28 changes: 28 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++ build active file",
"command": "/usr/bin/g++",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
Binary file added Output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions Pseudocode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Pseudocode

## Eric Geiger

### COSC 1436 | 21004

1. Start the program.
2. Show the menu.
3. Ask the user to choose an option.
4. If the choice is not valid, keep asking until it is valid.
5. If the user chooses Enter Expenses, ask how many expenses they want to enter, make sure it is between 1 and 20, and store the expenses in the array.
6. If the user chooses Display Summary, calculate the total, average, highest, and lowest expense, then display them. If no data has been entered,"No expenses have been entered yet", then back to menu.
7. If the user chooses Save Summary, write the same summary information to expenses.txt.
8. If the user chooses Exit, end the program.
9. Repeat the menu until the user exit.
110 changes: 109 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,109 @@
# cppFinal
# Final Exam: Comprehensive Take-Home Programming Assessment
## Course: COSC 1436 Programming Fundamentals I
### Textbook Coverage: Gaddis Chapters 1–7
### Total Points: 350

## Overview
This final exam is a comprehensive take-home assessment. You will design and create a complete C++ program that demonstrates your understanding of the major programming concepts covered this semester.

This assignment is not just about writing code. You are expected to show that you can plan, organize, test, explain, and complete a working program.

## Final Exam Program Topic
You will create a program called:

### **Personal Expense & Budget Analyzer**

Your program should allow a user to enter personal expenses, store those expenses, analyze the data, display results, and save the results to a file.

## Required Concepts
Your program must include:

- Variables and constants
- Input and output
- Calculations
- if/else decision structures
- while loop
- do-while loop
- for loop
- Functions
- Arrays
- File output
- Comments and readable formatting
- Required Program Features
- Your program must:

## Display a menu with the following options:
- Enter expenses
- Display summary
- Save summary to file
- Exit
- Ask the user how many expenses they want to enter.
- Validate that the number of expenses is between 1 and 20.
- Store all expenses in an array.
- Calculate and display:
- Total expenses
- Average expense
- Highest expense
- Lowest expense
- Save the expense summary to a file named:
- expenses.txt
- Use at least 3 programmer-defined functions.
- Include comments throughout the code.


# Required Submissions
##Submit the following:

- Pseudocode (pdf)
- Flowchart (pdf)
- C++ source code file (cpp)
- Screenshot of program output png or jpg
- copy of the output file (expenses.txt)
- Code review form (pdf)
- Academic Integrity
- You may discuss ideas with classmates, but every student must submit their own original work.

You may not copy another student’s code.

If you use AI tools, tutoring websites, videos, or outside help, you must acknowledge that assistance in a comment at the top of your code.

## Example:

- // I used ChatGPT to help me understand how to structure functions.
- // I wrote, tested, and modified the final code myself.
Failure to submit original work may result in a zero and possible referral according to course and college policy.

## 4. Code Review Form (Upload a PDF)
- COSC 1436 Final Exam Code Review Form
- Student Name: ___________________________
- Reviewer Name: ___________________________
- Date: ___________________________

## Program Review Questions
- Did the program compile successfully?
☐ Yes ☐ No
- Did the menu display correctly?
☐ Yes ☐ No
- Did the program allow the user to enter expenses?
☐ Yes ☐ No
- Did the program validate input correctly?
☐ Yes ☐ No
- Did the program use an array?
☐ Yes ☐ No
- Did the program use functions?
☐ Yes ☐ No
- Did the program calculate total, average, highest, and lowest correctly?
☐ Yes ☐ No
- Did the program save results to a file?
☐ Yes ☐ No
- Was the code easy to read?
☐ Yes ☐ No
- Were comments included and helpful?
☐ Yes ☐ No
- Reviewer Feedback
- One thing the program does well:

- One thing that could be improved:

- Reviewer Signature: ___________________________

5 changes: 5 additions & 0 deletions expenses.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Expense Summary
Total expenses: $15.00
Average expense: $3.00
Highest expense: $5.00
Lowest expense: $1.00
Loading