100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
COS2614 Assignment 3 2023 Solutions and Link to Project $6.83   Add to cart

Other

COS2614 Assignment 3 2023 Solutions and Link to Project

 100 views  6 purchases
  • Course
  • Institution

COS2614 Assignment 3 2023 solutions and link to working project.

Preview 4 out of 33  pages

  • August 29, 2023
  • 33
  • 2023/2024
  • Other
  • Unknown
avatar-seller
COS2614 Assignment 3 2023 [Link to
whole project on google drive]

written by

ExcelTogether




www.stuvia.com



Downloaded by: praishsewthal1 | praish98@gmail.com Want to earn
Distribution of this document is illegal R13,625 per year?

, Stuvia.com - The study-notes marketplace




COS2614
Programming: Contemporary Concepts
Assignment 3 & 4 / Test 2 | Semester 1 & 2 | 2023


✓ This document contains all the necessary code and screenshots (output) for all
3 questions.
✓ Assignment 3: Q1 –BankAccount (Console) | Q2 – TrafficLight (GUI)
✓ Assignment 4/Test 2: Q3 – StockRecorder(GUI)
✓ For more understanding the last page has a link to Google Drive to the entire
project in Qt. Just download and run in Qt to view and test working project.




All requirements have been fulfilled and all 3 projects are 100%
compiling!!!




Downloaded by: praishsewthal1 | praish98@gmail.com Want to earn
Distribution of this document is illegal R13,625 per year?

, Stuvia.com - The study-notes marketplace



QUESTION 1: BankAccount (Console Application)
Files




Code (Header Files)
balanceenquiry.h

#ifndef BALANCEENQUIRY_H
#define BALANCEENQUIRY_H

#include "transaction.h"

class BalanceEnquiry : public Transaction {
public:
BalanceEnquiry(const std::string& dateTime);

double computeCost() const override;
};

#endif // BALANCEENQUIRY_H


deposit.h

#ifndef DEPOSIT_H
#define DEPOSIT_H

#include "transaction.h"

class Deposit : public Transaction {
private:
double m_Fee;

public:
Deposit(const std::string& dateTime, double fee);

double computeCost() const override;
std::string toString() const override;
};

#endif // DEPOSIT_H



Downloaded by: praishsewthal1 | praish98@gmail.com Want to earn
Distribution of this document is illegal R13,625 per year?

, Stuvia.com - The study-notes marketplace


savingsaccount.h

#ifndef SAVINGSACCOUNT_H
#define SAVINGSACCOUNT_H

#include <string>
#include <vector>
#include "transaction.h"

class SavingsAccount {
private:
std::string m_CustomerName;
std::string m_AccountNumber;
std::vector<Transaction*> m_TransactionList;

public:
SavingsAccount(const std::string& customerName, const std::string&
accountNumber);
~SavingsAccount();

void addTransaction(Transaction* transaction);

double totalTransactionCost() const;
std::string frequentTransactionType() const;
std::vector<Transaction*> transactionsOnADate(const std::string& date)
const;
std::string toString() const;
};

#endif // SAVINGSACCOUNT_H


transaction.h

#ifndef TRANSACTION_H
#define TRANSACTION_H

#include <string>

class Transaction {
protected:
std::string m_Type;
std::string m_DateTime;

public:
Transaction(const std::string& type, const std::string& dateTime);
virtual ~Transaction() {}

std::string getType() const;
std::string getDateTime() const;

virtual double computeCost() const = 0;
virtual std::string toString() const;
};

#endif // TRANSACTION_H




Downloaded by: praishsewthal1 | praish98@gmail.com Want to earn
Distribution of this document is illegal R13,625 per year?

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller UniStar. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $6.83. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

81113 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$6.83  6x  sold
  • (0)
  Add to cart