Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 07-25-2005, 03:25 PM   #1 (permalink)
logic321
Registered User
 
Join Date: Jul 2005
Posts: 6
logic321 is on a distinguished road
Class Problem

Hi All,

This is my assignment. You were a very big help to me before in understanding concept, and since I am in the beginning stages here, I was wondering if you could offer me some tips on where to begin, or even a sample program. Thanks.

Create a SavingsAccount class. Use a static data member to contain the annualInterestRate for each of the savers. Each member of the class contains a private data member savingsBalance indicating the amount the saver currently has on deposit. Provide a calculateMonthlyInterest member function that calculates the monthly interest by multiplying the balance by annualInterestRate divided by 12; this interest should be added to savingsBalance. Provide a static member function modifyInterestRate that sets the static annualInterestRate to a new value. Write a driver program to test class SavingsAccount. Instantiate two different savingsAccount objects, saver1 and saver2 with balances of $2000.00 and $3000.00, respectively. Set annualInterestRate to 3%. Then calculate the monthly interest and print the new balances for each of the savers. Then set the annualInterestRate to 4%, and calculate the next month's interest and print the new balances for each of the savers.
logic321 is offline   Reply With Quote
Old 07-25-2005, 05:10 PM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,726
redhead is on a distinguished road
I'm too tired at the moment to get any understanding out of this, it's 2am here, on the other hand I expect to have a day at work tomorrow, with absolutely nothing to do. So I guess I'll take a look at it there....
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 07-25-2005, 05:23 PM   #3 (permalink)
logic321
Registered User
 
Join Date: Jul 2005
Posts: 6
logic321 is on a distinguished road
See Ya Tomorrow

That's fine. Thanks for the help. I will look for your reply tomorrow.
logic321 is offline   Reply With Quote
Old 07-25-2005, 10:20 PM   #4 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
This assignment is a dead giveaway. Why don't you start with creating the class and the (empty) methods, the static member, and the data member?
__________________
Valmont is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with C++ & Win32 in a class DIY_Gamer Platform/API C++ 1 07-29-2005 08:45 AM
Class using a specific instance of another class? is this possible? abs Standard C, C++ 5 02-08-2005 04:12 PM
looping problem maria_arif MS Technologies ( ASP, VB, C#, .NET ) 1 11-29-2004 09:07 AM


All times are GMT -8. The time now is 08:46 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting