r/learnjava • u/RuneZhevitz • Nov 02 '16
Problem with MOOC exercise 13 week 1 NHLStatistics
The exercise has me import a something via import nhlstats.NHLStatistics; when I get that I can play around with it and do some stuff the exercise wants em to do. It wouldn't be the biggest problem bc rn I don't need it but it's a part 1 so there probably will come more and if it doesn't work now it maybe it won't later.
I understand what's supposed to happen though, should I just skip this or will it haunt me?
2
u/Madbest Nov 02 '16
After your response to @PointB1ank I actually still can't understand what do you mean.
Your only task here is import nhlstats.NHLStatistics and use methods of this class.
If that methods are working for you (they're returning stats of players in console) it's all ok! You dont need to do anything more for now.
I have this exercise done so if you want code I'll provide it for you, but firstly show us what did you already do.
1
u/RuneZhevitz Nov 02 '16
When I run the example code 1:1 I get a console error. I can't show you what I did bc I'm not at the pm anymore but basically at first I typed the example text per hand, error, then I copied it 1:1, error then I changed the part that defines the class to the original one and still got that error. Maybe it's a server-side thing bc I don't see the NHL statistics part in the other packages too. Also would you mind if I ask you some things about that course in general I don't know where Ppl participating in the course exchange information with each other
2
u/Madbest Nov 02 '16
https://groups.google.com/forum/#!forum/moocfi
Here.
Copypaste me your error and fell free to ask me questions.
1
u/RuneZhevitz Nov 03 '16
Thanks for the link. as big as this course is supposed to be I thought that's more of a dead place, and the real place is somewhere else. I'll ask you my questions tomorrow (and paste my code) so thank you for now.
1
1
u/RuneZhevitz Nov 03 '16 edited Nov 05 '16
Tomorrow! Didn't get the time to study Java today but I did not forget :( tomorrow 2
1
u/RuneZhevitz Nov 07 '16
Alright, Pastebin Code this is the code that I'm supposed to use and this the error I get in the end.
About my questions:
If you finished the course, what are you able to do?
What did you do with your knowledge? I like creating things but everything I want to make is far beyond my capabilities for the moment. So what should I or would you create in order to deepen what I learned?
Where did you get your help (besides the google place and the IRC chat)
Sorry for that I took so long to answer
1
u/Madbest Nov 08 '16
Firstly: I don't know what you need "Pastebin Code" part. It's for second exercise with NHLstatistics. Secondly: Why you presume that you'll code will throw any Exception? In second part of that course exceptions are explained. And to the error: You probably changed name of your class from Main to Mainprogram, but filename is Main.java. Class name and filename should be the same. Change class name to Main or change filename to Mainprogram.
1
u/PointB1ank Nov 03 '16
It can't be server side, you aren't communicating with any servers. The nhlstatiatics class files are contained in the libraries folder.
1
u/A_Lazy_Bystander Apr 25 '17
I am using Eclipse, and I assume that nhlstats component is in Net Beans libraries folder only...? Is there a way I could download or transfer it to Eclipse?
1
u/A_Lazy_Bystander Apr 25 '17
I am using Eclipse, and I assume that nhlstats component is in Net Beans libraries folder only...? Is there a way I could download or transfer it to Eclipse?
2
u/PointB1ank Nov 02 '16 edited Nov 02 '16
Sorry, but can you rephrase the question? I'm very confused. What you are looking at is called an import statement and they are vital to almost every program you write.
All you have to do is add import nhlstats.NHLStatistics; to the top of your code and it should work. The component is already included in the source files they have you download.