Seriously fuck my CS Java homework
>create an abstract class AbstractMachine
>extend Machine class to AbstractMachine
>extend Refrigerator class TO Machine class
>create a List with the type Machine to track different machines
What the fuck? So you are supposed to create a Machine object which creates and links an object to a refrigerator object?
OOP is sure a meme
>i don't understand something so I'll call it a meme
OP sure is a faggot
>>52433058
>java
;^)
>>52433072
>implying it's even possible to link an object to a subclass
>>52433058
You're reading it all wrong
Fridge extends Machine, which itself extends AbstractMachine
then the fridge is stored by polymorphic reference in a List<Machine>
>>52433089
hence he doesn't understand it
>>52433097
And when creating a Fridge object you have to create a new Machine which creates a subclass that requires a super constructor... we're going in loops
>>52433172
show me your Refrigerator :^)
>>52433097
Not OP but id be interested to see what the non-abstract Machine class implements that necessitates its existence
>>52433484
OP here: nothing really, it's only supposed to implement different constructors that saves stores some variables and apparently create a Fridge object according to the task
Yes, abstracting this much out for a small shitty CS assignment is obnoxious and none of us would ever do it.
That being said, when your code base is for an enterprise application that is hundreds of thousands of lines of code, these practices are necessary.
Just take it with a grain of salt for now, and be able to understand the basic principles later. You won't really need them much.
>>52433058
programming is literally the easiest assignment you can get in a CS class. If you can't handle that, you should change majors, or drop out.
you fucking subhuman BETA FAGGOT.