This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Personality Program Percentage Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Personality Program Percentage Problem" Watch "Personality Program Percentage Problem" New topic
Author

Personality Program Percentage Problem

Laura Peterson
Greenhorn

Joined: Mar 14, 2013
Posts: 23

I'm working on a problem that processes an input file of data for a personality test known as the Keirsey Temperament Sorter. (www.keirsey.com for more info) After I get my checkpoint output (which is correct according to my test data), I need to compute and output a second file with the percentage of "B" answers. This is where I get lost- any advice, references, or helpful hints would be welcome.
I've included a link with the instructions for the problem, since they're particularly complicated.
http://www.docstoc.com/docs/116890487/CSE-Summer-Programming-Assignment-Personality
And for those concerned, this is NOT a homework problem, merely an extra credit opportunity for anyone who wants to try a challenge. (I have a 97% in the class, but I need the programming practice.)
Thank you!



Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14278
    
  21

Welcome to the Ranch.

Can you be a bit more specific about what you are lost about?

The count method in your code looks awfully complicated. It's not clear at all what exactly it does.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39478
    
  28
Welcome again
Why have you got so many static methods? That suggests you are not using object‑oriented programming.
Laura Peterson
Greenhorn

Joined: Mar 14, 2013
Posts: 23

In response to your questions... I'm lost as to how to get the percentage of the answer B from the information sorted in the method count. What I have doesn't really do anything, and I'm not sure what more to do.
We haven't gotten into OOP yet. We've covered expressions, loops, strings, arrays, scanner- pretty much it. We'll be doing classes next, I imagine.
Thank you!
 
 
subject: Personality Program Percentage Problem