>first programming interview (c++) >learn easy shit like fizzbuzz and gaussian sum like Jow Forums says >Okay, user, implement and demonstrate a way to make a class final without using said keyword
NOOO IT WASNT SUPPOSED TO END LIKE THIS WHY DID YOU LIE TO ME
replace all variables with getter functions that return the desired final value
Cooper Jackson
???? Final means the class cannot be inherited
Alexander Hill
Just use immutable.
Evan Diaz
Do this without doing this - is the most stupid kind of test It shows the interviewer has no experience in coming up with realistic, applicable questions
Jonathan Young
please don't glare at me, reimu it will give you wrinkles
That's how programmers who think outside the box are made.
Daniel Myers
>set constructors to private well that was tough
Camden Bailey
Retard, now you can't instanciate that class.
Nathaniel Torres
How do you use it then?
Levi Watson
Class Aux; Class Final;
Class Aux { friend class Final; private: Aux(){} }; class Final : private Aux {};
Samuel Barnes
God damnit, it's Class Final : virtual private Aux
Lucas Sullivan
How did you reply when they asked you that?
Christian Cox
you don't think it's a real situation user? that guy tries to get answers for his homework
Jackson Barnes
>I don't spend my time learning bad practices of languages, my dude.
Daniel Wood
>Okay user you have to solve these 3 questions, we'll lock you in here for 8 hours while you do them, no internet ofcourse so we will take your cellphone >O-o-okay
>Q1: Replace all letters in string with other string, essentially turning stuff into leetspeak, i.e R -> |2 >Np finish very quickly
>Q2: Find the inverse integer matrix >Mfw I never did matricies at UNI >Mfw the room had books on math though >Find the answer to what the fuck they meant, solve it after awhile
>Q3: 20 targets are moving in linear direction and fixed speed, you have a fixed speed, what is the quickest time you can intercept them all including the time it takes for the target to walk back to 0,0 ? >Oh and your solution has to do it in under a second on this shitty laptop >I knew quadratic equations would become usefull one day >Finish as they walk in the door
Last interview today, after 5 others, with the companies CEO, how will i drop the spaghetti do you think?
I sat their cringing. He said "Hint: virtual. Inheritance." I added a public method virtual Shape inheritance(const Shape& x1) and he just wiped the board in front of my face and started nodding.
Joseph Foster
Obviously you create public static Factory that produces said class instances
Grayson Cooper
What does that have to do with quadratic equations?
Mason Mitchell
What the fuck is the point of that? Just to test if OP have heard about "final" before?
Zachary Peterson
The interviewer never said it had to be usable.
Henry Ortiz
Classes are usable when you put 'final'.
Alexander Cruz
Calculating where you have to "Aim" to intercept a moving target. I would honestly love to see if you have another solution since I was never 100% with my own.
Assume you can shoot a bullet at Bs speed and are standing and coordinates Bx, By Assume the target is standing at target Tx, Ty and is moving at Tsx, Tsy speed.
Cooper Garcia
>failing basic programming language question
at least you can fizzbuzz
Sebastian Bailey
And that's a bad thing. If you have to think outside the box it means the tools your using are bad.
Eli Butler
>software engineering and architecture is bad Huh...
Isaac Sanders
This is the first time I have heard the term final as well. I don't write java.
Gavin Ross
It's been introduced in C++11.
Liam Collins
That's interesting, didn't know it. How did you inverse the matrix?
Nolan Hernandez
There's no reason to seal a class with final.
Samuel Lopez
What if I don't want some chucklefuck shitting up my api?
Robert Roberts
I can see that. Doesn't mean I ever had to use it. It is much more important to be able to have a class that is extendable than having a class that isn't in my line of work.
Oliver Miller
Sealing your classes won't protect you from that.
Dylan Torres
fuck him up in the office with passive aggressiveness
Kevin Hill
close the pull request you cuck
John Hernandez
Turns out there are just very fixed rules you can abuse for a 2x2 matrix (which was what the question was about, 2x2 only): // Assuming matrix indicies as: // --------- // | 0 | 1 | // |-------| // | 2 | 3 | // ---------
Lol classic. None of you cucks actually know how to do it except that one user but you hurry to comment.
Cameron Rodriguez
Why I was using an Int to do integer math is what you're asking?
Jason James
I keep telling Jow Forums that they should learn more about OOP and stop jerking off over being able to code in C, but nobody ever listens.
Wyatt Morales
haha cuck, mine was fizzbuzz I had never done fizzbuzz in my life before I did it something with if-else that might have worked, not sure, was pretty bad got hired php developer
Julian Flores
fuck you
Evan Brown
>implement and demonstrate a way to make a class final without using said keyword
CRTP base with private constructor and derived templated class friend.
Tyler Russell
shit, *virtual* CRTP base
James Rodriguez
Sorry, no re-dos, your answer was wrong. Yyyeah we'll call you, goodbye.