Question: C++ Class File Hw help ( Please use Linux C++11 language ) CSE 1325-001 Homework #3 Using Classes In this homework, you will create a

C++ Class File Hw help ( Please use Linux C++11 language)
 C++ Class File Hw help ( Please use Linux C++11 language)
CSE 1325-001 Homework #3 Using Classes In this homework, you will create

CSE 1325-001 Homework #3 Using Classes In this homework, you will create a class that stores a list of transactions and computes the average transaction for a given month. The user must input the name of the month and the transactions into the terminal The Transaction List Class First you will create two C++files called abc1234 Transaction List.h and abc1234 Transaction List.cpp. Below is a UML class diagram that shows the basic design of the Transaction List dass Transaction List month string transactions : vector num transactions: int + Transaction List(m: string + get month0: string + add transaction(transaction : double) +average transaction): double This class contains a list of transactions for a certain month. Each transaction is represented a double in the vector transactions. The constructor sets the month equal to the m and the num transactions to 0. get name returns the name of the month. add transaction adds a new transaction to the list of transactions and 1 to num transactions. average transaction returns the average transaction for that month. If there are no transactions, then this should return O. Testing the Transaction_List Next you will test your Transaction_List class by creating a new C++file called abc1234 test.cpp, which consists of just a main method. The main function must be able to do the following three tests Test #1 o Create a Transaction List object named "May and add 4 transactions: 150, 225.3,78.9 o Get the Transaction List's name. If the month is not "May, display a useful error o Compute the average transaction for the month. If the average is not 244.5475, display and 523.99 message to the terminal (cout). a useful error message to the terminal (cout). Test #2 o Create another Transaction List called "March"and add 4 transactions: 150, 225.3, o Get the Transaction List's name. If the month is not "May, display a useful error o Compute the average transaction for the month. If the average is not 244.5475, display 78.9, and 523.99 message to the terminal (cout). a useful error message to the terminal (cout)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!