[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Seriously fuck my CS Java homework >create an abstract class
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

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

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.