Explore BrainMass
Share

Budgeting Report for a Local Company Using C++

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

You are to develop a budgeting report for a local company using a C++ program. There are two input files. The first input file lists the individual areas a budget has been defined for. Two of these are the two checking accounts where the budget is the amount of money in the accounts. The 'ledger.dat' file contains the list of budget areas.

A second file contains the list of invoices and written checks against a given budget.
You are to read in the second file 'journal.dat' and update the value in each of the budgeted areas.
Print out a report showing the budgets and their current values. Some will be under and other will be over budget.

Use an array of structures to hold the data. Use pointers to move through the array (no subscripts syntax). Read in the 'ledger.dat' and initialize the array of structs. Read in the 'journal.dat' and update the values in the array of structs.

Format of 'ledger.dat' file.
budget# budget name initialValue

Format of 'journal.dat' (More data on a line of input than you need.)
Budget# Number? date ExpenseAreaText ExpenseValue
ExpenseValue is a positive for cost and negative for deduction

Print out a nice table (using pointers) of the budget areas and the resulting balance.

© BrainMass Inc. brainmass.com October 25, 2018, 7:27 am ad1c9bdddf
https://brainmass.com/computer-science/computer-system-implementation/budgeting-report-for-a-local-company-using-c-503784

Attachments

Solution Preview

Please find attached an implementation "503784.cpp" and corrected "journal.dat" file.

Please note that there are two issues with your "journal.dat" file.

1. The entry "565 1287 04/20/98 Electric^I^I 145.63" has two tab characters, as indicated by '^I' here. Rest of the entries in journal.dat and ledger.dat do not have tab characters at all.
The response works with the assumption that only space would be used in the ledger and journal entries.

2. Your "journal.dat" specifies negative expense values like "- 78.70", "- 500.00", ... . Since ExpenseValue is a single column, how can you have the negative sign separated from the values, sometimes by single space, sometimes by two spaces? It should be uniform representation of values in this column, like "-78.70", "-500.00", ... with no space character coming between the sign and the value. Presence of space there means we should have two columns there - one for sign and one for absolute value, however we have just single column for ExpenseValue.

This response ...

Solution Summary

Attached program code has been tested compiling warning and error free, and working, using GNU C++ compiler "g++" version 4.3.4 . Please study this response thoroughly and formulate your own response in your style of writing code and comments, removing extra things that you do not need there - like this response prints the formatted ledger data as read from "ledger.dat" file as a cross-checking measure, and there are couple of error checks that you might not need.

$2.19
See Also This Related BrainMass Solution

Develop database tables using a relational database system

This is the problem:

Tom Ashton started Ashton Manufacturing Inc (AMI) several years ago. The Company has grown quickly from a small operation to the mid-sized organization it is today. AMI has an opportunity to take on an additional customer. This arrangement will allow AMI to grow to a large organization operating nearly 24 hours a day / 7 days a week.

Recently AMI has been experiencing significant downtime due to a failing software application written for AMI when the company started. This Access database application is responsible for a key manufacturing process.

Mr. Ashton and his investors are concerned the Company can not grow until the technical infrastructure is in place and functioning properly. AMI has limited funds for IT endeavors but has hired your consulting firm seeking advice.

Objective:

Prepare a 1-page executive summary including your recommendations to repair or replace the application. Support this summary with a research paper which contains the details behind the summary.

Start by researching Microsoft Access and other prominent RDBMS such as MS SQL Server, Oracle and My SQL. Compare and contrast these systems based on key features such as scalability, ease of implementation (development and support), performance, security and price.

Include a discussion on SQL:

What is SQL?
Who owns SQL?
What are some of the differences in the SQL supported by RDBMS vendors?

View Full Posting Details