Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Im trying to see if my private members with my struct is createdcorrectly. Class

ID: 3610270 • Letter: I

Question

Im trying to see if my private members with my struct is createdcorrectly.

Class Account Design Overview
Class Account will have the following private data members:
? account number (a string)
? password (a string)
? current balance (a double)
? a pointer to a linked list; the list will keep track of allsuccessful deposits and withdrawals from the
account; the list will
? consist of nodes created from structs with a datacomponent and a pointer to the next node
in the list; the mode will have a data component that consists forthe date of the transaction
(a string) and the amount of the transaction (a double)
? grow from the front, i.e. the most recent transaction willbe first in the list



#include <iostream>
#include <string>
using namespace std;

#ifndef _ACCOUNT_H
#define    _ACCOUNT_H
struct bankAcct
    {
        string date;
        doubletransactionAmt;
        bankAcct *next;
    };
class account
{
public:
    account();
    account(string accountNum,stringinitPassword,double currentBalance);
    void makeDeposit(double depositAmt);
    void makewithDrawl(double withdrawlAmt, stringtypedPassword);
    double getBalance();
    int getAcctNum();
    void chngPassword(string typedPassowrd);
    ~account();
    account(const account & otherAccount);
   
    const account & operator=(const account& otherAccount);
   
private:
    string acctNum;
    string password;
    double balance;
    void add(bankAcct *item);
   
    friend ostream & operator<<(ostream& out, account & otherAccount);
    friend istream & operator>>(istream& in, account & otherAccount);
};
#endif    /* _ACCOUNT_H */


Explanation / Answer

No I finished it a while ago but thanks very much.