[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
Please someone help me. :( I might kill myself if I fail this
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /r9k/ - ROBOT9001

Thread replies: 16
Thread images: 4
File: part 1.png (227 KB, 940x814) Image search: [Google]
part 1.png
227 KB, 940x814
Please someone help me. :(

I might kill myself if I fail this semester. I am already on academic probation and on the verge of dismissal. I am a retard and picked a major that I have no interest in, but it's been 3 years and it's too late to change now. I've been bullshitting and trying to just get by.

Can a computer sci major /robot/ give me a hint on how I can complete this assignment?

The professor wants you to use polymorphism, while building an abstract classes that other classes derive off of.

I don't have any friends to ask for help and I am too socially afraid to ask the professor for help.
>>
File: Task 2.png (75 KB, 610x687) Image search: [Google]
Task 2.png
75 KB, 610x687
Please I am having a panic attack. I don't want to get bitched by the counselor again this semester.
>>
>>24738732
Just overwrite the classes to change the calculations??????????
>>
>>24738780
Meant to say functions I'm pretty drunk right now
>>
Why the fuck would you major in CS if you dont like coding?
>>
>>24738732
I've barely taken any programming but just make a class with some variable you can set to tell you what object type it is and make your functions conditional on that.
>>
Now I'm quite rusty in C++
but I'm pretty sure you just add some getters and setters to each of the 4 classes.
Some display function to write everything to the console or some shit.

The only "difficult" part should be the CircleYourName operator+(CircleYourName c1, CircleYourName c2); Function.

Now CylinderYourName derives all the getters and cetters from the CircleYourName class except you overwrite the adding operator and the display function

Same story for Rectangles and Boxes
>>
>>24738795
>I'm drunk
Have you considered not impairing your ability to think logically, which is the most important things when programming?

>>24738816
He possibly fell for the "computer science is a robot's best friend" meme.
>>
>>24738974
But its friday night senpai.
>>
File: image.jpg (72 KB, 464x700) Image search: [Google]
image.jpg
72 KB, 464x700
>>24738732
How the hell are you doing this basic shit THREE YEARS into your major? I'm LMAOing @ your life right now, t b h familia
>>
>>24739042
seriously, we did this shit in intro to object oriented programming freshman year
what third rate community college is op attending
>>
>>24738732
>that guy will get his degree and a job
>I thought of reimplementing PHP's whole system with String, Integer, Float, and so on, into classes, with chaining (new S('asd') -> [str]len -> pow(2)), magic methods for the built-in library (automatic performance of functions such as strpos on the encapsulated raw value), type casting (echo new N(123) === '123'), and so on, when I was 19
>I will end up homeless anyway
>>
>>24739098
>whole system
*whole type system
>>
File: Untitled.png (22 KB, 800x600) Image search: [Google]
Untitled.png
22 KB, 800x600
I'm gonna be honest with you OP. You are fucking retarded. If you don't like what you're learning right now then you won't like what you have to do as a job for the next 30 or so years. Go learn something you actually have an interest in and not fall for "LE STEM MASTERRAEC" meme.
>>
>>24738732
I would help you, but it's natural selection man. You have all the instructions needed. Also, you have the fucking internet I'm pretty sure that if you just google c++ polymorphism you'll get pretty much the same shit.
>>
>>24739215
yeah it's not like there's not enough competition in the job market already
if op fails, then good; fewer resumes for recruiters to trash before they get to mine
Thread replies: 16
Thread images: 4

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.