Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > C++ Programming
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 25th, 2009, 07:41 AM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 46
Thanks: 2
Thanked 1 Time in 1 Post
Default How to improve this BankAccount class

I have the following class i which it is predetermined that there will be just 2 types of accounts i.e. Single and Joint. Now i want to use enum here. How can i do that and would it be useful and why?

Also i have a variable 'DateOfOpening' whose data type is string. Here i want to use my own data type called 'Date'. How can i do that? Wonder if i should use time.h header file here for this pusrpose. Please comment, explain and justify your answer

class BankAccount
{
private:
string type;
string name;
string DateOfOpening;
string accno;
double balance;

public:
void setAccno(string);
string getAccno();

void setType(string);
string getType();

void setName(string);
string getName();

void setDateOfOpening(string);
string getDateOfOpening();

void Deposit(double);
void Withdraw(double);
double DisplayBalance(void);
};
__________________
MAXOOD!

Life is an endless journey towards perfection
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Improve on this code...? niallhannon Pro VB 6 7 February 24th, 2007 01:47 PM
how to improve this code? dhaval229 SQL Language 0 February 20th, 2006 04:38 AM
how to improve this code? dhaval229 SQL Language 0 February 20th, 2006 04:36 AM
How to Improve Myself in ASP ranuji BOOK: Access 2003 VBA Programmer's Reference 4 April 22nd, 2005 08:53 AM
How do i improve the performance of report syedjavid Crystal Reports 4 October 26th, 2003 05:46 AM



All times are GMT -4. The time now is 02:21 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.