Friday, July 29, 2005

ugh, i cant believe another two weeks have past since i last wrote any entries. anyway...

for the last two weeks, my students have shown steady improvement in their ability to create object oriented programs. i mean, i could really see the difference. at first they were clueless as to what attributes to use, how to stucture their class, stuff like that. at the end of this period, things were going quite well..

me 13 was class taxi. i asked them to implement this with the following methods:

* Taxi(int initialmoney, double initialgas)
* void flagdown() - taxi becomes occupied, meter set to 30, error if method is called while taxi is occupied
* void travel(int km) - taxi tries to travel a certain distance. for every kilometer, gas level decreases by .1 liter. if the taxi is occupied, meter increases by 10. outputs an error if taxi has run out of gas
* void getoff() - passenger gets off. meter value is added to taxi's current money and gross income.
* void getgas(int liter) - gas costs 30 per liter, taken from taxi's current money, of course outputs an error if the taxi does not have any current money.
* int getGrossIncome() - returns gross income
* int getExpenses() - returns total expenses spent on gas
* int getNetIncome() - gross income - expenses
* int getCurrentMoney() - returns current money
* int totalKm() - total kilometers travelled

only 1/4 of my class was able to submit this on time

ME 14 is a Vector-type class. I asked them to implement a class SuperArray with the following methods:

* void set(int index, String data)
* String get(int index)
* void changeSize(int newSize) - changes the size of the SuperArray. values beyond the new size are discarded.
* public String toString() - returns a String with SuperArray's elements in the form {a,b,c...}

change size was tricky for them, but a good majority was able to finish the ME on time

ME15 is a free-for-all mp. I asked them to create an OOP class of their own.

Today is the end of another 2 week cycle. ME 16-17 may have been quite hard, as only 2 people (in both my classes) were able to submit it on time.

An extension of the SuperArray class, class SongList has the following methods:

* void addSong(String title, String band, String genre, int lengthinseconds)
* boolean contains(String title)
* boolean delete(String title)
* int numberOfSongs()
* public String toString() - prints out all the information per song, and total playlist time

and the tricky methods
* SongList createListBand(String band)
* SongList createListGenre(String genre)
which basically create new SongLists whose songs match the band/genre

It was heartbreaking to watch my students stare at computer screens. Some of them couldnt even get addMethod right, having problems with array declaration and use.

I dont know what to do next. i have to move on with the lesson, yet i cant as im still not that confident with my students ability. all that progress in the last two weeks seem to disappear when they're doing something by themselves. *sigh*


At 5:11 PM, Blogger mac.n.tux said...

well done, mario!!!

Ps linking your blog to mine

At 11:00 AM, Blogger switch said...

Well, through 17 machine exercises in 8-10 weeks, I'd be a little tired as well. If your schedule can allow it, try to intersperse some breathing room.


Post a Comment

<< Home