[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Seriously fuck my CS Java homework >create an abstract class

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 12
Thread images: 2

File: cs.jpg (669KB, 1280x1240px) Image search: [Google]
cs.jpg
669KB, 1280x1240px
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.
Thread posts: 12
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.