• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

My main class will not display my code

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I'm trying to display 15 project and 10 quiz scores but they're not displaying at all in the console

My student class:





MAIN Class:



 
lowercase baba
Posts: 13069
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

kenny gill wrote:
I'm trying to display 15 project and 10 quiz scores but they're not displaying at all in the console


What IS it doing?

Most people are not going to try going through 250 lines of code to figure that out. Your job is to make it EASY for us to help you.
 
kenny gill
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The problem is that the console is not displaying a single thing. It should be displaying a few project and quiz scores I have entered but nothing is displaying; the screen is empty

I don't know fix this problem.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're never setting any project score or quiz score. This will cause to make both getProjectScoreForid and getQuizScoreForid return "".
 
Marshal
Posts: 76395
364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It isn’t 250 lines of code, Fred, but 250 lines of mostly blank space.
KG: please indent your code correctly, get rid of most of those blank lines, and post it again. You will find it so much easier to read and understand.
Make your inequalities simple. It is much easier to read i < j that i <= j - 1. And much less error‑prone.
Have you still got the constructor in the form you posted originally? There is a very serious error in it, which many beginners make. Actually there is a second error in that constructor.
Use for loops preferentially for iterating arrays. Use the conventional form of the for loop for (int i = 0; i < array.length; i++){//...}, not forgetting the {}.
 
When it is used for evil, then watch out! When it is used for good, then things are much nicer. Like this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic