Question
PROJECT ( Straight - Line Depreciation ) ( 100 points ) Objective To write a program that computes a straight - line depreciation. PROJECT DESCRIPTION
PROJECT ( Straight - Line Depreciation ) ( 100 points )
Objective To write a program that computes a straight - line depreciation.
PROJECT DESCRIPTION
Natoma Telecommunications has purchased a business - use computer system costing
$ 6,500 . The pertinent information concerning this asset is listed in Figure 1 below.
Natomas accounting manager wants you to write a computer program, which will calculate the annual straight - line depreciation of this asset and generate a depreciation schedule showing the year - to - year deprecation over the expected life of the asset.
Figure 1 Business Asset Information
asset type
|
|
Computer System
|
asset cost
|
|
$ 6,500.00
|
asset life
|
|
5 years
|
salvage value
|
|
$ 500.00
|
Information About This Project
In accounting, the formula for straight - line depreciation is:
V ( t ) = C ? C R t
where V ( t ) is the value of the asset at time t , C is the asset cost and R is the rate defined:
R = |
asset cost ? salvage value
|
|
asset cost asset life |
Once the asset cost, life and salvage value are known, a complete depreciation schedule can be prepared, the template of which is illustrated below. The depreciation schedule shows the year, annual depreciation, accumulated amount and book or current value.
Since we are dealing with straight - line depreciation, the annual depreciation is the same for years 1 through 5 . The current accumulated depreciation is obtained by adding the current year annual depreciation to the prior accumulated depreciation. The current book value is obtained by subtracting the prior book value by the annual depreciation.
Figure 2 Asset Depreciation Schedule
|
|
|
|
|
|
|
Year
|
| Annual Depreciation
|
| Accumulated Amount
|
| Book Value
|
|
|
|
|
|
|
|
0
|
| --
|
| --
|
| $ 6,500.00
|
1
|
| $ 1,200.00
|
| $ 1,200.00
|
| $ 5,300.00
|
2
|
| $ 1,200.00
|
| $ 2,400.00
|
| $ 4,100.00
|
3
|
| $ 1,200.00
|
| $ 3,600.00
|
| $ 2,900.00
|
4
|
| $ 1,200.00
|
| $ 4,800.00
|
| $ 1,700.00
|
5
|
| $ 1,200.00
|
| $ 6,000.00
|
| $ 0,500.00
|
|
|
|
|
|
|
|
PROJECT ( Straight - Line Depreciation )
Steps To Complete This Project
STEP 1 Open MS Visual C + + and Write the Program Code
Open Visual C + + on your computer. First type the code given in Figure 3 .
The code consists of the preprocessing directive and the class definition.
Save the file as: Linear.cpp
Figure 3 Completed Program Code for the Depreciation Program
|
#include using namespace std; //preprocessing directive(s)
class Depreciate //class definition { private: //data members char asset[20]; double cost, rate, salvage, time, value; int life; public: Depreciate() { //class constructor cost = 0; rate = 0; value = 0; salvage = 0; time = 0; life = 0; } void getInfo() { //member functions cout << "enter the asset type "; cin.getline(asset,20); cout << "enter the asset cost "; cin >> cost; cout << "enter the salvage value "; cin >> salvage; cout << "enter the asset life "; cin >> life; cout << "enter the time (in years) "; cin >> time; } void Compute() { rate = (cost - salvage) /(cost * life); value = cost - cost * rate * time; } void Display() { cout << "the asset value after year " << time << " is "; cout << value << endl; } };
|
|
PROJECT ( Straight - Line Depreciation )
STEP 2 Write the Program Code
After you type the code for the class definition, code the main() function directly below the class definition.
Figure 4 main() Function for the Depreciation Program
|
int main() { //Depreciation Application: Sammy Student Programmer
//instantiate a class object Depreciate x;
//object calls member functions x.getInfo(); x.Compute(); x.Display();
return 0; }
|
|
STEP 3 Compile and Run your Program
Build, compile and run your program. Test the operation of your program using appropriate numbers for your input variables. Use the information provided within Figure 1 .
STEP 4 Modify Your Program Code
With your program running properly, modify the main() function and the class definition such that your program will display the entire depreciation schedule shown previously in Figure 2 .
STEP 5 Submit Your Program Code and Your Run Time Output
When completed, submit your program source code as well as the program output(s).
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