Skip to content

Instantly share code, notes, and snippets.

@ah052070
Created November 2, 2012 01:41
Show Gist options
  • Save ah052070/3998118 to your computer and use it in GitHub Desktop.
Save ah052070/3998118 to your computer and use it in GitHub Desktop.
Prepcode for program involving transactions
Prepcode for MintyDriver
CREATE main method to run class MintyDRIVER
CREATE BankReader object to access the financial data
SET int numberOfTransactions equal to br.getNumberTRansactions method
PRINT the number of transactions
CREATE an array list to hold the number of transactions
CREATE Transaction object and store into transactionList
GET the transactions from BankReader object and assign it to variables
CREATE new Transaction for each GetNext method
ADD the created transactions into ArrayList
SUM the transactions for a total amount to be printed
PRINT the total of all the transactions from http://pic.fsu.edu/courses/2011/summer/cop2258/assignments/mintymoney/bank.csv
Prepcode for BankReader
IMPORT java utility that lets java read info from a website
CREATE class which reads clients transactions from internet database file and returns info
DECLARE private list variable to hold transactions so that java recognizes it as the same things as new ArrayList. The line will end with a (); to hold the number of things in the array
CREATE new URL object
CREATE reader to get stream from internet page
RETRIEVE the file content from internet and store in the array list
CLOSE the stream from the internet
DECLARE transactionIterator to hold the retrieved list values
Prepcod e for Transaaction class
DECLARE private instance variables to hold date, vendor, and price
DECLARE public String getDate method
RETURN date
DECLARE public setDate method
SET date equal to this.date
REPEAT for getVendor() method
REPEAT for getPrice() method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment