All pastes #1272033 Raw Edit

Siddharth Dahiya

public cpp v1 · immutable
#1272033 ·published 2008-12-01 05:36 UTC
rendered paste body
/*******************************************************                                                     **  Professor                 Lloyd Parker             **  Course:                   OOP244                   **  Assignment:               3                        **  Student:                  Siddharth Dahiya         **  Student #:                016-194-086              **  Student userid:           sdahiya1                 **  This File Name:           Bank.h		              **                                                     *********************************************************                                                     **  This assignment represents my own work in          **  accordance with Seneca Academic Policy             **                                                     **       Signature: Siddharth Dahiya                   *******************************************************/// Header file Bank.h for the class Bank.#include <stdio.h>#include "Account.h"class Bank{	//Pointer to array of Account objects	Account *savings;	//File Pointer	FILE *fp;	//Current Number of Account objects in Array pointed by savings	int size;	//Max number of Account objects that may be stored in the Array pointed by Savings	int arraySize;public:	//Default Constructor	Bank();	//Constructor	Bank(char [] );private:	//Private Member to increase the size of the Savings Array	int grow(int s = 10 );public:    //Destructor	~Bank( );	//Overloaded Operator +=	const char* operator+=( const char [] );	//Change customerInfo at savings[pos] with c	int changeCustomer( const char c[], int pos );	//Change accountNumber at savings[pos] with num	int changeAccountNumber( const char num[], int pos);	//Change balance at savings[pos] with b	int changeBalance( int b, int pos );	//Get the last name of the customer in 'savings[pos]' and save it in 'st'	void getLastName( char st[], int pos );	//Get the first name of the customer in 'savings[pos]' and save it in 'st'	void getFirstName( char st[], int pos );	//Get the city of the customer in 'savings[pos]' and save it in 'st'	void getCity( char st[], int pos );	//Get the phoneNumber of the customer in 'savings[pos]' and save it in 'st'	void getPhoneNumber( char st[], int pos );	//Return savings[pos].customer if pos is valid	const char* getCustomer(int pos) const;	//Return savings[pos].accountNumber if pos is valid	const char* getAccountNumber(int pos) const;    //Return savings[pos].balance if pos is valid    int getBalance(int pos) const;	//Return savings[pos].balance where savings[pos].accountNumber is 'st'	int getBalance(char st[])const;	//Return arraySize	int getArraySize() const;	// Returns Size	int getSize() const;	//Return total balance of all Accoutns objects	int total();	//open fp	FILE* setFp( const char [] );	//Recieve reference to, and initialize bank object	Bank( const Bank& );	//overloaded operator to assign bank object on left to bank object on right	const Bank& operator=( const Bank& );		//get part of the string required	char * getPart(char st[], int comma);};