I'm having a problem with one part of this assignment, the instruction is this "Add a method transaction which takes two int parameters, daynum and amount. daynum is the day of the month, and amount is an amount of money made or lost for a transaction on that day. (hint: days of the month are numbered starting from 1, arrays arent; think about how to handle this)." this is what I have so farpublic class MonthlyRecord { //instance variables private String month; private double[] moneyDaily; //default constructor public MonthlyRecord() { month = "January"; moneyDaily = new double[31]; } //accessor for monthlyRecord public String getMonth() { return month; } //mutator for monthlyRecord public void setMonth(String v) { month = v; } //constructor with parameters from whatever is calling it public MonthlyRecord(String b, int x) { month = b; moneyDaily = new double[x]; } /*Add a method transaction which takes two * int parameters, daynum and amount. * daynum is the day of the month, * and amount is an amount of money made or * lost for a transaction on that day*/ public void Transaction(int dayNum, int amount) { dayNum = 0; amount = 0;
It could just be because my brain feels a lttle fried for some reason, but what am I missing here to ensure this is done correctly? Thx in advance!