The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 304 Weeks Ago, 4 Days Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
So for Java I have to answer the following question:
SUMMARY
The overall goal of this problem is to read a list of people and their medical profiles from a file, and write out a file of their calculated BMIs.
BMI = weight / height2Â * 703
where weight is in pounds and height is in inches
INPUTS
The input file has the following fields:
  Person ID #
  Last name
  First name
  Height (inches)
  Weight (lbs)
This input file has a header record (a first line describing the fields in the file). Each field is separated by a tab. Example files to use (medrec_mac.txt, medrec_pc.txt) will be included on Blackboard with this assignment.
PROCESSING
Your program should read each record of the file into a Person object, which should have properties corresponding to the input file fields. This class should also contain a method to calculate BMI.
OUTPUT
The output file (which your program should write) should have the following fields:
  Person ID # (from the input file)
  BMI (calculated based on the inputs)
Your output file, like the input file, should have a header record, e.g.,
  PersonID    BMI
as well as tab separated data records.
CLASSES
It is recommended your program be comprised of two classes and include the following methods:
 class Person:
     public Person(int id, String lastName, String FirstName,
                                                  double height, double weight);
     public double calcBMI( );
 class BmiCheck:
     public static void processRecords(String filenameIn, String filenameOut);
     public static void main(String args[]);
EXTRA CREDIT (2 points)
Have your program prompt for a cutoff BMI. Save to the file any BMIs above this cutoff.Â
Â
I have absolutely no idea how to go about doing this thank you in advance for your help.
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly