You will most likely encounter many problems in this lab. Before you raise your hand for help, try to understand what happens with your program. If it is a compile problem, read the messages on the screen; the compiler tries to give you a hint of what went wrong; can you figure out what it's telling you?
If your program compiles, but when run it does not give you quite the desired output, then we say that it has bugs. Try to debug it. Try to understand what happens, what are the instructions that are being executed, in what order. To debug, people use lots of "print" instructions. Print out the values of the variables that are relevant; this will help you understand how values change and when the errors occurs.
Programming style: Pay attention to issues of programming style:
Work individually, and call me if you need help. You are encouraged to discuss ideas and techniques broadly with other class members, but not specifics. Discussions should be limited to questions that can be asked and answered without using any written medium (e.g. pencil and paper or email). You should at no point look at the screen of your colleagues.
Blood cell histogram
Write a program that takes as input an arbitrary number of red blood cell counts in the range 0 to 50 and does two things:
You can assume that the user enters valid blood cell counts.
Example: The program should look like this (or similar):
Number of patients: 7 Enter the blood cell counts: 24.5 36.8 25.66 44.12 48.0 45.22 33.9 The average blood cell count was 36.8857 The distribution of the red blood cell counts was: healthy: **** anemic: ***
Send me only the .java file (not the entire folder), as attachment.