OKay so i have assignment called mystery calculator, it seems simple enough but im stuck on how to arrange it..
What initially has to be done is that i have 6 'cards' populated with a series of numbers which cant be hardcoded ..
what i have so far is
My Question is: should i have a separate class called Card and instantiate the 6 arraylists there? or should i have one arraylist in a Card class and one araylist in Calculator class and somehow do it like that? im new to this and relly could do with some help much appreciate
Difficult to be sure, and there is a very nice distinction between some of your options.
I don't know the full details about having Lists in different classes, but the idea of one List in one class and another List in another class seems a bit suspect to me.
The difference between what you have and a Card class appears slight, but I suspect you will get better OO design, a minor consideration, and better marks, a major consideration, if you can create a Card class and keep your 6 Lists in 6 Card objects.
I presume you don't mind that some numbers are going into several cards?
You realise that i % 16 can never be > 15, which means you might be able to simplify several of your if conditions.
yea my major consideration is good marks, just starting programming and liking it..
So I went and made a 'Card' class and it works but...... I have a feeling my code is kindof bloated and im trying to cut down on the amount of code (this is what lecturers are telling us to do),
heres what I have so far, this is my Calculator class
And here is my Card class
What i want to know is any way of lessening this code? Is there a way I can get rid of all those separate printCard*() methods?