Rate my Java test Sup Forums
Now I got a 69% but the teacher is adding 10 points to everyone’s test meaning I got a 79%. Took this test at 8 o’clock in the morning a week ago. Ready for a roasting / ready to improve muh skills.
Rate my Java test Sup Forums
Now I got a 69% but the teacher is adding 10 points to everyone’s test meaning I got a 79%. Took this test at 8 o’clock in the morning a week ago. Ready for a roasting / ready to improve muh skills.
Page 2
Page == 3
Page 4 lol
Constructive criticism always appreciated. I do my homework on eclipse because netbeans was ugly. I also compile with javac in terminal.
What a fucking easy test. I'm not even shitposting.
>code without monospace font
>written coding test
From my personal experience community college is much harder then state university, probably because people pay more for optimized classes with good teachers that hand A’s (or at least C’s) like candy.
>written coding test
More common that you'd might think.
qmul?
At my school, people try to take courses at CC because they're easier than the ones here.
And they can't even write properly.
>"statement that causes compilation"
They meant "statement that causes an error in compilation" but they mistyped it twice.
OP may be retarded but looks like he's in good company.
Have you never been to a university? Oh, wait, you are probably one of those that are too smart for it
...
Yeah libshit studies. Took calc 3 twice at cc because i had a drunk professor and a bitch after that. They don’t give a fuck at all about students. Comparing my brothers class at Berkeley and my CC class tests was a fucking joke. I had two triple integrals on my final that took up 30 mins of my time.
Do you understand why this is wrong?
Who the fuck writes code like this?
In any serious company you will get fired if your application looks anything like that.
Syntax, if it was a GO or python class a written test would be easier.
kek
My university have more computers than students
enjoy your poorfag university from your poor country
Sure, syntax as well, but you need to implement a method that returns a string. Now you are writing a main method inside toString method
Explains a lot why your university has so little people and you are a shit programmer. If you can't write a program on paper, you are no good
Okay ty, did i make the bag method right?
I am a physicsfag.
>Explains a lot why your university has so little people
it's because they take only 50 students per class, despite getting more than 700 applications each year (that number is still growing). They pick the best.
>you are a shit programmer
Explain that to the companies that send mail to my uni to recruit students so they don't even have to search a job after the diplomas (including me)
> If you can't write a program on paper, you are no good
I can't, but it's retarded, I have no reason to do that.
Admit it, your university is shit and so is your country
>I can't
*I can
I can't read your handwriting good, sorry but it doesn't seem like it. Since task description is telling that it's a linked list, firstNode must link to a second node, second must link to third and so on.
How I would approach this is create StringBuilder object, then have a while loop that goes while(firstNode.next() != null) . Then append to StringBuilder object each value of the node so sb.append(firstNode.value) and finally first node = firstNode.next(). Not sure if it would work, but I think it's closer to solution than yours. Check linked lists.
>fisrtNode
An inefficient solution would kinda look like (excuse me, I don't know java):
String out = "";
Node *node = this.firstNode;
while (node != nil) {
if (out == "") {
out = node.toString();
} else {
out= out + " " + node.toString();
node = node.Next();
]
return out;
What the question is asking you to do is to traverse the linked list and combine them into a single string.
There's some random stuff that doesn't make any sense to me.
What is int size[:] == 3; supposed to mean?
Every university gets companies sending mails asking to recruit students, your university is not special. All classes are around 50 people in my uni as well, again, your university is not special. Writing code on paper tests of how well you know the language. It's easy when you have ide or text editor complaining about your error, or have the ability to run the code and see if it works, it's harder when you have to debug in your head. You seem young and proud, hopefully when those super companies hire you, you will be put to place
>the excuses for not coding on a computer
We actually did some test on paper, but only for the basics in the first month. It's retarded to do paper tests beyond that point.
> It's easy when you have ide or text editor complaining about your error, or have the ability to run the code and see if it works
Because it's how it fucking works in the real word
We don't code theory, we code pratical
Fucking Australians, learn to rotate your pictures.
The stuff seems simple enough, don't know how you almost failed.
>java
enjoy working at mcdonalds
What the guy is doing is basics though.
You don't have any knowledge if you rely on tools that help you. Test purpose is to see if you know enough, not if you can use the tools.
You seem to not get anything I'm saying
>adding 10% to everyone's scores
I remember community college.
What a fucking shitshow.
It's literally impossible to get a failing grade unless you don't turn anything in.
>Test purpose is to see if you know enough, not if you can use the tools.
is that 1970?
Continue being proud and dumb, you will surely get far in life
assuming you already covered generics in your class, and I don't really blame you for not getting it without an IDE
package org.fourchan.g;
import java.util.LinkedList;
import java.util.List;
public class OpLinkedList extends LinkedList{
//answer
@Override
public String toString() {
String returnString = "";
for (T item : this) {
returnString+=item.toString() + " ";
}
return returnString;
}
//just a test to run this
public static void main (String[] args) {
List opList = new OpLinkedList();
opList.add("hello");
opList.add("world");
opList.add("test");
System.out.println(opList);
}
}
I don't get the OP pic
shouldn't s3 cause an error because you are giving the function a string and not an object?
obj is type Object
you are passing it to g which accepts type Object, besides
>you are giving the function a string and not an object
String is still an Object and will still work as you described
>String is still an Object
but then the String object wouldn't have the f function?
well I don't really know how the toString() function works in Java. I just assumed that it converts the object into a text and the text depends on what object it was.
string concatenation in loop would get you a 0/10 at any decent place
ah yes you're right I didn't saw that part. I think that would cause a classcastexception, so I guess s3 would be an answer
toString() really is just whatever you want your Object to print that you think would describe it. You can make it return "OP is a fag" and that would be fine
>All these cunts who never went to a university
There are written tests everywhere for a CS degree, especially in the beginner courses. Fuck I went to a top 25 college and it did this shit and this was only a year ago. Colleges are outdated as fuck in tech, it is no real surprise.
I could use a StringBuilder but I didn't really want to bother, just made it simpler for OP
It's perfectly fine to use paper tests in the first few weeks imho
...
Paper tests are fine, but the way it's written is pretty confusing.
Not a java programmer but in Class X won't you run into a compilation error by calling f2(); before its declaration? Or does java just dynamically instantiate it when called.
This happens in C because you needed to fit a compiler in 20kb RAM. Java had no such restrictions
Seems you get what you pay for, cc is cheap and isn't expensive at the most part but uni is probably another story
What if you attend a college for 4 yrs in a tech school and make 90k off the bat?
Doesn't matter. You can call a method from anywhere in the class.
I dont use java, but f3 cant be called from x.
so mark was $150k in debt before hire?
>probably because people pay more for optimized classes with good teachers that hand A’s (or at least C’s) like candy.
But that sounds like community college and people pay less for it
the errors for the top question are o3,o4 and o5.
o3 = cant convert type x to y. y extends x, but its a different class type.
o4 is exactly the same, except a different var name.
o5 because ol variable name doesnt exist.
Technically a tech school is a college desu
Cont.2
Why did he mark f8 wrong for the bottom question? I mean, you can access the method within itself.
Part B is objA.b and objA.f2()
(Unsure about 'final' keyboard in java's context, so i left it out)
>Took this test at 8 o’clock in the morning a week ago
So many people in college use this shit as an excuse, like if you can't handle school at 8 in the morning you're a fucking bitch that isn't going to amount to anything in life.
>05 because ol variable name doesnt exist.
It's not ol, it's o1 and it exists, it's at the top right user.
>X o1 = new Z();
>Z o5 = (Z) o1;
Because the variable "o1" is formerly holding the reference of an object of type Z and not X, it doesn't give compilation errors, but you still have to cast it with (Z) in the second line.
If instead you had:
>X o1 = new X();
>Z o5 = (Z) o1;
Then this would give a compilation error.
Shut your fucking mouth faggot. I wake up at 6:30, get ready by 7 commute to school which takes an hour THEN I hop on BART and go to my banking job. FUCK YOU AND YOUR SHIT ANIME.
k a year
not with Uncle Sam taking 40% in the form of taxes.
>second part of the answer completely wrong
>17/20 points
>solution is written in some made up language that barely resembles java and makes it blatantly obvious that you have never written a java program and that you have no idea what a linked list is
>10/20 points
The absolute state of CS degrees.
You are the kind of person that get a CS degree but can't write fizzbuzz. And you can't even blame yourself, blame the people who gave you 69 points for this crap.
I'm not going to check the other pages but I see plenty of red there too.
If I was grading page 1 and 4 you'd get no more than 5 points for "which statement cases a compilation error" and nothing else.
I've taken courses at both. CC can be harder, depending on the material. Calc was way harder at CC than at University, because the latter had better teachers and had more reasonable demands. Like at uni, we were allowed a notecard during our tests, which we were to write formulas on. CC we just had to memorize every formula ever mentioned in class.
Uni also had easier numbers to work with. Like you weren't asked to take the antiderivative of (3/4x^(2/9) + 7/3e^(x/2)) and then have the teacher expect you to have the exact answer computed. At university, they just wanted you to know how to do the problem, so the numbers would just be like (3/4)x^3 + e^(x/2). Like in an hour test, you'd have more problems than at CC, but they'd have like 1 problem where you actually compute the antiderivative and the rest you could leave the answer in integral form. Like you didn't get the problem wrong for making a silly computation error, they just wanted you to know how to solve it.
truth...
its not an achievement doing something before 9am its called being a fucking adult
u mad whitboi? We takin over this bitch
toString is a method of the object class. It simply returns a string when called. obj is still referencing the Y object.
Chill. I have a long ass commute that I have to get up early for too. You're still a fucking bitch.
>I do my homework on eclipse because netbeans was ugly. I also compile with javac in terminal.
You never successfully compiled anything.
holy let