• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help with my code.  RSS feed

 
Aaron Mantic
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,

I have an assignment to create a GPA calculator for my school. I need to create is so it reads a set of course grades from a transcript file, which my program must then display the grade points earned in each couse, and then a chart graphing the student's GPA within the range of possibilities. The output and what it looks like can be seen in my attachment. What I need help with is one of my functions that I have to create, it has to be in the format of my second attachments. I have three other functions that are part of my code (in attachment three), but I am stuck in what i need to do in my first function. Any help would be great!


Here is what I have for the first function so far;

Screen-Shot-2015-03-27-at-2.26.23-PM.png
[Thumbnail for Screen-Shot-2015-03-27-at-2.26.23-PM.png]
Output
Screen-Shot-2015-03-27-at-2.28.13-PM.png
[Thumbnail for Screen-Shot-2015-03-27-at-2.28.13-PM.png]
Function.
Screen-Shot-2015-03-27-at-2.31.22-PM.png
[Thumbnail for Screen-Shot-2015-03-27-at-2.31.22-PM.png]
Other Functions
 
Junilu Lacar
Sheriff
Posts: 11494
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Aaron, Welcome to the Ranch!

You wrote:I am stuck in what i need to do in my first function

We're here to extend any help we can. However, saying that "I'm stuck" won't help us help you. You need to clearly define what it is you need to do. This is not only for us but it's also for your benefit, so you have a good idea of what you want the program to do. If you can't clearly state what the problem is and lay it out so that it can broken down into smaller, more manageable pieces, then it's going to be tough to write instructions for the computer to execute to solve your problem.
 
Junilu Lacar
Sheriff
Posts: 11494
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me give you a hint, so maybe you'll see what I mean by "defining the problem" -- You have this Transcript class, right? BTW, these things are called "classes" not "functions". And this Transcript class is supposed to read a text file. Do you know how to get it to read a text file? If not, then your first problem can be stated as: "How do I read a Text File?"

The answer to this question can be found with a search on "Java how to read a text file". You might even have an example of how to do that in your course notes or textbook. This is one smaller problem that you can tackle first and it will lead you to other problems. You just tackle each small problem, one at a time, and then string up the solutions so that you can solve the big problem.

If you solve this problem about reading text files, it will lead you to the problem of "How do I get this information that I read from the text file into a Course object?" And so on and so forth.

Does that help you get unstuck?

Note that we encourage all students to DoYourOwnHomework and to ShowSomeEffort (←click on those links and read up on how things work around here).

Good luck!
 
Aaron Mantic
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!