View Single Post
Old 01-29-2013, 03:05 PM   PM User | #3
blahblahblah
New to the CF scene

 
Join Date: Jan 2013
Posts: 2
Thanks: 2
Thanked 0 Times in 0 Posts
blahblahblah is an unknown quantity at this point
Thank you very much for the hep Fou-Lu. I was able to get my program fully working. The only small problem I have left is when I delete an event, the most recent activity is deleted rather than what i specified. This is the code I am using:

Code:
public void deleteEvent() {
		Scanner input = new Scanner(System.in);
		OurDate date = new OurDate();
		OurTime time = new OurTime();
		date.inputFromKeyboard();
		time.inputFromKeyboard();
		for (int i = 1; i <= numEvents; i++) {
		    Event e = this.activities[i];
		    if (e.getDate().isEqual(activities[numEvents].getDate()) && e.getTime().isEqual(activities[numEvents].getTime())) {
		    	activities[i] = null;
		    	numEvents--;
		        activities[i] = new Event();
		    }
		}
	}
I have to do this without an array list as well.
blahblahblah is offline   Reply With Quote