I'm going full fucking autism right now! I'm too stupid to get this shit. How the fuck do I do pic related?

I'm going full fucking autism right now! I'm too stupid to get this shit. How the fuck do I do pic related?

Other urls found in this thread:

lmgtfy.com/?q=java create class
lmgtfy.com/?q=java create getters setters
lmgtfy.com/?q=java create constant
pastebin.com/3K5YfRvx
docs.oracle.com/javase/tutorial/
docs.oracle.com/javase/tutorial/java/javaOO/thiskey.html
blog.codinghorror.com/why-cant-programmers-program/
blog.codinghorror.com/separating-programming-sheep-from-non-programming-goats/
twitter.com/NSFWRedditGif

I didn't read all of it but what trouble are you having? It seems to just be basic input/output and and some fields.

Pretty much all of it. I don't understand anything it's asking me to do and every time I ask my useless cunt of a professor for help he just tells me the read through a chapter that doesn't explain fucking anything

This is the most basic Java stuff. If you're not able to find the solution/google the solution for this your in the wrong track. Stop here because you're going to fail either way.

what was the chapter about?

FUCK OFF NORMIE TELL ME THE FUCKING ANSWER YOU CUNT

setters & getters

You're not made for IT is the sinple answer.

This, this is the most entry-level shit. You have to be either a fucking retard or utterly lazy not to get it

64779837 isn't op just a troll

op is this a first year Java course? Like, first semester you're taking Java?

Have you successfully written any programs in Java yet? Other than hello world?

Read the textbook dude

>There are people who have trouble implementing this
>These people browse this board
Oh wow!

>REEEE WHY WONT MY PROFESSOR SPOON FEED ME

Yup first year, 5 weeks in.
A grade calculator
I did. I've read through the same chapters so many times but the stupid analogies make it difficult to understand what's being explained

Your professor's teaching you a valuable lesson: stop asking people to spoonfeed you, do your own research

If the text your class uses feels useless, go find another book on java that you actually like. You should be able to teach this to yourself. That prompt requires you to understand classes, IO, and a few loops so go read about those.

This problem looks super trivial. What annoys me is the first three bullet points. Why do they look like that? And then why do the sub points have a different style and the sub sub points have another style?

/triggered

The current class average is 0. He fail us if we can't explain the code flawlessly regardless of if it works. Only 3 people in the class have past any of the past 3 assignments.He's not teaching us anything, just wasting our fucking time

Just do a fucking Java Tutorial on Youtube.

I don't understand the problem you are having. This is basic object oriented programming practice. Have you learned any programming language prior to Java? I mean the assignment lays out exactly what you have to do and how it has to be done.

Learn to Google then

lmgtfy.com/?q=java create class
lmgtfy.com/?q=java create getters setters
lmgtfy.com/?q=java create constant

etc.

Which of the following things have you used and can accurately describe:
>Classes
>Methods
>Fields
>What it means for a field to be constant
>Prompting for user input
>Getters/setters
>Constructors
>if/else statements
Whatever you don't know, go look it up in a book or use an online tutorial. Then come back and try again.

>4 grade fields
>5 getters/setters for the grade fields
???

If you can't figure this out by yourself you should flip burgers, not fit to be a code monkey.

I am not even in a CS program and my teachers make us do flowcharts and explain exactly how our code works. If you can't explain how it works, you don't understand it. Start with writing pseudocode. If you don't know what pseudocode is, then go Google it and learn it. It won't take long, and you likely know how to do it already. It is important to get pseudocode down, even if it's on a napkin. It will help structure your thoughts and understand what specific tasks you don't understand how to do.

>the stupid analogies make it difficult to understand what's being explained
Sorry buddy, but you're probably stupid.

try finishing the rest.
import java.util.Scanner;

class Transcript {
private static final int PIN = 164892;

// 4 grade fields
private int grade;

// 4 personal information fields
private int personal;

Transcript(int grade, int personal) {
this.grade = grade;
this.personal = personal;
}

int getGrade() {
return this.grade;
}

void setGrade(int grade) {
this.grade = grade;
}

// rest of getters and setters

void printGrade() {
if (this.grade >= 90 && this.grade

Delete this.

Don't spoon-feed him too much. He may just copy and paste whatever you post and try to submit it, kek.

I dont know anything about java so maybe they use the word "class" differently but why would a single class be responsible for all that like authentication and authorization and IO and all the rest of that stuff and why not separate those responsibilities?

also remove the "continue;" line.

>// 4 personal information fields
> private int personal;

lol

Because this is a beginners lesson that is supposed to give the student something relateable.
This is obviously not something you would use in 'real' software.

Sorry I should have been clearer. I don't understand how to do any of it past the class. I just get errors in the constructor. I have no idea how to do the method.
Used:
>classes
>methods
>prompting for user input
>constructors
I can't describe or explain any of them except the prompts for user input
He doesn't let us use pseudocode or flow charts. We have to know it from memory.
I am stupid
I appreciate it but I don't want the code given to me I want to understand how it works. Also, what's the "this." part under Transcript(int grade, int personal)?

It's not a matter of him "letting you use pseudocode" you are doing an assignment, jot down how you are planning to do it before you do it. That's like saying your professor doesn't let you use comments in your code

this.variablename
means that the variable he references is the one of the class that he defined earlier.
grade is a parameter of the method
this.grade is a class variable.

Thank you. Is it something that has to be used in the code?

you needy ungrateful faggot. people write code for you and you dont take it. i hope your teacher fails your entire class and you go back to working valvoline.
sage.

lol butthurt retard

>to be used
Class variables? Yes.
The PIN constant is also a class variable. You may create several instances of that class with different parameters.
The term
this.grade = grade;
is just used so that he can map the class variable to the parameter inside the method.
I think you lack the fundamentals of OOP.

Butthurt much? He expresses a desire to actually learn and you lash out like some sperg. Calm down.

Do you understand the concept of getters and setters in a class? And the concept of private variables and variable scope?

That is the worst explanation of OOP I've ever seen

If the chapter is difficult to understand watch youtube videos on it too get your head around it and then re-read the chapter

Honestly though. Miku is/was/ will always be trash and a mistake. Two wasn't enough, Japan.

It is not the worst one, but it is pretty bad, yeah.
But I like the idea, you could use something similiar to explain design patterns with a miku builder or miku factory.

no, OP clearly picked a shitwipe CS program (OR he just browses Cred Forums in class and doesn't pay attention), and so instead of doing any research on his own, he asks for people here to spoonfeed him an entire course's worth of java 101.

fuck slackers like him and fuck you for being enablers. i have no patience for them. half of my CS class were dumbasses like him begging for help at the last minute, and it was no surprise that i graduated with highest honors and best GPA, and i know that i'm making at least twice than a handful of them.

do the fucking work. Cred Forums is not homework help central. i'd be more sympathetic if he had most of it done and was stuck on a weird compiler error, but he's not.

Again, I appreciate that he took the time to write the code for me but there's no point in having it if I can't understand it or do it myself.
I definitely lack the fundamentals. I think I need to find a better book to help with that. Also, just to be sure, the your pic is saying that programs can be written different ways for the same result?
Not really. I think setters are assigning something and getters are retrieving something. Private means it can't be accessed by things outside it's class and I've no idea what scope is.

While you come off as a reddit r/iamverysmart autist, you do make a decent point. I know those same kinds of people from my embedded systems classes in C. What OP really needs to do is post what he has done so far code wise. If he legitimately doesn't understand some core concepts of OOP /you/ don't have to be the one to explain. Just dip out and browse a different thread. It seems there are a couple of people more than willing to help him.

A class is the blueprints of a house.
An object is the actual house.

Transcript is a class. new Transcript() returns an object (aka instance), an implementation of the Transcript class.

pastebin.com/3K5YfRvx
;^)

I just gave you some code since you asked "how do i do" this. Try doing the Trails Covering the Basics here:
docs.oracle.com/javase/tutorial/

Here is their explanation of the this keyword.
docs.oracle.com/javase/tutorial/java/javaOO/thiskey.html

Also see if your university has free tutoring or something similar. Your professor is not there to coddle you, and likely only cares about his research.

>Also, just to be sure, the your pic is saying that programs can be written different ways for the same result?
No.
Think of the terms in the assignment.
You create a transcript for yourself, with personal informations about yourself.
Another person might create another instance of that class with his personal information.
Now there are 2 instances of the same class that have stored different personal information.
>I've no idea what scope is.
Maybe you should start with something easier.

OP is just trolling you fags, he's obviously lying

>that printGrades method
You will never work in the US with this kind of shit Pajeet.

This is what is asked.

There are many ways of solving a problem. Yours is simply retarded.

The code simply follow what is asked.
Obviously it's retarded.

Use one method to print one grade, call that method in 'printGrades' with each grade.

Thanks, these are far more helpful than the course resources

This shit is pretty fucking basic dude. Programming isn't for you. Find a different degree.

Yours is far better but it's not what is asked.
Acting like you're smart in java 101 is the worst thing you can do.

Nothing about simplifying those awful conditions?

>these people give their opinions and advice here

>acting like you're smart
>having methods that are shorter than 50 fucking lines
You don't have to act smart but you also don't have to be a retard

Thanks for writing out the code, I appreciate you taking the time to do so but I'm looking for explanations as to how it works

Didnt even look at the conditionals, only saw copy/pasted code.
This could be also done much easier inside a method that returns a string with
(note: I checked b4 that the grade in question is between 0 and 100)
private String grade(int grade){
if (grade

blog.codinghorror.com/why-cant-programmers-program/
blog.codinghorror.com/separating-programming-sheep-from-non-programming-goats/

Oh I just noticed that my solution wouldnt even pass because it doesnt use if/else.
Silly of me.
Is probably right that sometimes the better solution is worse.

are you in grade 9 or retarded? i get high everyday and dont go to any lectures and 100% will not find a job after uni but even I can do this shit LMAO

Your solution (assuming you talk about )
doesn't have to use "else" though.

Goddammit Cred Forums, you used to be cool...

Everything in this assignement is retarded.
No package
no junit tests
grades as variables instead of arraylist/hashmap/whatever_data_structure
ask two scanners in two differents methods
ask to display courses names but never ask to enter them
Why personal informations?
hardcoded pin? Really?
This assignement is utter trash if the goal is to learn java/OOP.
literally nothing makes sense.

Yes it doesnt need to, but in the assignment it says "use if-else command".
So depending on how much of a dick the professor is, you fail.
I know that my solution doesnt need and else, I did it this way because I think it looks clean and easy.

You're an idiot. This is clearly like a first or second week Java assignment. It's fine enough for an introduction to OOP

The real solution is to store grades in the right data structure.
An hashmap with the course name as key and the grade as value sounds like a good answer if you only want to store one grade.

Forth week assignment and we haven't arraylist or hashmap yet. If it's really that simple then I think I'm just going to see how everyone else is doing in the class. If I'm one on the last few still not getting it than I'm just going to drop out. No point in trying to do something if I'm too stupid to do it, right?

Not OP

The assignment doesn't specify how the info on each student is stored as far as I can tell. List? Array? Dictionary?

Either way yeah OP you need to learn this

Stop being a quitter. Ask on the right sites and look for the right resources.
Cred Forums is not one of these.

Not OP

This assignment type was my 2nd semester of my coding studies back in my uni days actually

I did ask other places, both in the college and online. This was a last resort out of frustration

You're likely not too stupid to learn programming. You simply lack exposure to the concepts. You need to learn on your own time as well by doing some simple projects by yourself. Use YouTube. Frankly in my opinion Java is a shit language to teach as a first language anyway. I believe Python is a much easier language to start off on.

this might be close enough to a java beginner code.
The code is simple, you should be able to understand what it does by simply searching what each method does.

dude

class and object difference
getters and setters
java constant
java user input
java print

These are all the things you have to google. What's the difficult part?

> How the fuck do I do pic related?

You? You go on hackhands or chegg and pay a third worlder to do it for you.

In all seriousness I wonder how much would one charge to do OP's hw. Since a seasoned coder can do it in like 30 min.

I have been googling them though. I just cant seem to retain anything about what they do or how to use them. I can't relate anything to anything and just keep getting everything mixed up.

Not to defend this guy, but sometimes it's hard to Google things if you don't know what to search for. Now that's no excuse now, since we've all told him exactly what he needs to look up and learn.

>30 mins
I'd do it in 10 for a burger

Without IDE?

Shit, I'd do it on a napkin with a crayon in 15 minutes, and I don't even know Java.

If you add fries and a drink sure

Just do what it says.

Alright user listen up, you can do this but it does take a bunch of practice. Rather than trying to start programming asap when you see the assignment, try to understand what it is asking you to do, and understand it before you start to program.

For example; The transcript module needs to take how many fields? Which ones do you need to give access to, which variables have to be initialised? Take a blank piece of paper and model it out in a diagram if you have to. You can't start coding if you dont understand.

Also don't listen to the whole "That's the easiest thing user!" bullshit. Everyone had to go through the fundamentals to understand how to program, and everyone has had the same problem as you. Don't get discouraged, just get working.

The best advice I've received about programming is that it's basically "smashing your head against the wall trying to understand a problem, and having the resilience to keep trying until you succeed."

Holy shit this just made me realize the problem! I've been trying too learn by equating everything to individual words opposed to formulas, like math.
>Thanks user, good to know & screencapped for later. I'm going to take the 0 on this assignment and just start for scratch trying to learn as stated above.

Thanks Cred Forums for helping a tard be less of a tard

>provide complete pseudocode including logic so student doesn't even have to solve the problem
>ask student to turn it into code
>student can't do it

Jesus Christ.

How could you be 5 weeks into a course and not understand something as basic as getters and setters?

...wut

public class Poo {
loo();
}

Literally anyone who takes a CS course for their first time. Throw a shitty professor into the mix and there you go.

Toppest kek

drop out now and take liberal arts while it's not too late

lel, watch a youtube vid