Can someone please conver the following code into a sequence diagram for me? the 4 instances and classes with the life lines are: theUI:UserInterface, theCashPoint:CashPoint, theActiveAccount:BankAccount and transactions:TransactionList

void CashPoint::m4_produceStatementForBankAccount() const {
    string statement( p_theActiveAccount_->prepareFormattedStatement());
    theUI_.showStatementOnScreen( statement);
}


string BankAccount::prepareFormattedStatement() const {
    ostringstream os;
    //account details
    os << prepareFormattedAccountDetails();
    //list of transactions (or message if empty)
    if ( ! transactions_.isEmpty())
        os << "\n\nLIST OF TRANSACTIONS \n"   << transactions_.toFormattedString(); //one per line
    else
        os << "\n\nNO TRANSACTIONS IN BANK ACCOUNT!";
    return ( os.str());
}

Can someone please conver the following code into a sequence diagram for me? the 4 instances and classes with the life lines are: theUI:UserInterface, theCashPoint:CashPoint, theActiveAccount:BankAccount and transactions:TransactionList

void CashPoint::m4_produceStatementForBankAccount() const {
    string statement( p_theActiveAccount_->prepareFormattedStatement());
    theUI_.showStatementOnScreen( statement);
}


string BankAccount::prepareFormattedStatement() const {
    ostringstream os;
    //account details
    os << prepareFormattedAccountDetails();
    //list of transactions (or message if empty)
    if ( ! transactions_.isEmpty())
        os << "\n\nLIST OF TRANSACTIONS \n"   << transactions_.toFormattedString(); //one per line
    else
        os << "\n\nNO TRANSACTIONS IN BANK ACCOUNT!";
    return ( os.str());
} 

end quote.

You might want to see your other post where you copy/paste homework questions for my answer.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.