Hi Guys,
Kindly help me Solve this. I have already worked on the classes that were inherited and attached after the question is the main part of my program. I have bolded the part in the question below where I need help. Thank you so much.
The question is:
Make an array of BankAcct pointers and assign each of the three object addresses into this array. Set up a loop that asks the user what type of banking transaction he or she wants. For whatever type of transaction, run a for loop and call the appropriate function. After each transaction, call the ShowAll functions, which report all data associated with each object. For example, if the user wishes to deposit $100, then $100 is deposited into each account. (Try to conserve space so that all the data may be written on the screen for each transaction). Be sure to place error messages if the user attempts to perform an illegal transaction (i.e. not enough money in the account to make the requested withdrawal). Your program should ask if he or she wishes to perform another transaction. Quit the program when the user is finished.

#include <iostream>
# include "BankAcct.h"
# include "AtmBankAcct.h"
# include "Gold_BankAcct.h"
using namespace std;
using namsepace Judith;

int main()

//(Objects for the classes)
BankAcct ExpressInc("Dimer", "0123672580", "500.00");

//Alternative way
	//cout<<" Enter the Name of the Account Holder"<<endl;
	//cin>> ExpressInc.setName;
             //cout<<" Enter Your Account Number (10 digits):"<<end;
	//cin>> ExpressInc.setaccount_Number;
	//cout<<" The savings Balance is:" <<endl;
	// cin>> ExpressInc.setaccount_Number;
ATM_BankAcct KenyaAirways(" British","0123456290"," 1500.00");


Gold_BankAcct Student( " Judith", "8005672865" , "25,000.00");


	 BankAcct *ABank;
	 ABank=&ExpressInc;// Base pointer points to the base class 
	 ABank=&KenyaAirways;// It points to the KenyaAirways 
		int Bankaccounts;
	 char Select;
		cout<<" Welcome to Bank Of Judith! Select one option."<<endl;
		cout<<" Select 1. for a Bank Account Transaction "<<\n";
		cout<<" Select 2. for a ATM_BankAcct Transaction "<<\n";
		cout<<" Select 3. for a ATM_GoldAcct Transaction "<<\n";
		cin>> Select;
		cout<<" You Selected:"<<Select<<endl;
	if (Select==1)
    for( int i=0; i<Bankaccounts;i++)

// I could not figure out how to work on from here. The for loop section.

	 return 0;

Please Bail me out of this pointers.

11 Years
Discussion Span
Last Post by marinme
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.