ResearchPaperWriters.com has established itself as the best academic writing website through a combination of well-furnished writers, highly-rated custom research paper writing services, top-level writers, discounts, punctual delivery, and 24/7 support. These facets come together to create a platform that not only meets but often exceeds the academic writing needs of its clients. Whether you are a student grappling with tight deadlines or a researcher in need of in-depth, well-researched papers, ResearchPaperWriters.com is the pinnacle of academic writing excellence, ready to provide you with top-tier services and exceptional results. At the core of ResearchPaperWriters.com’s success are its well-furnished writers. The platform prides itself on the caliber of its writers, who are highly qualified professionals with expertise in various academic fields. These writers have a deep understanding of the intricacies and requirements of different academic disciplines, ensuring that each project is handled with the utmost care and competence. Their proficiency in conducting thorough research and crafting well-structured, academically rigorous papers is the cornerstone of the website’s success.

You will be creating a person class.  This person class will have the following data ID Number, Name, Height (in feet and inches), and Weight, so FIVE pieces of data.

You will have methods to store the ID, Name, Height (two parameters one for feet, one for inches), and Weight.

You will have methods to return the ID and Name.

You will have methods to calculate the BMI and BMI Classification.

 

BMI Formula = (pounds*703) / (inches * inches)

BMI Classifications (your method will return Underweight, Normal weight, Overweight, or Obesity)

Underweight = BMI <18.5

Normal weight = BMI between 18.5–24.9

Overweight = BMI between 25–29.9

Obesity = BMI of 30 or greater

 

Create a normal (non-method function) that will take in two people objects and return a boolean value of TRUE or FALSE.  This function will compare the person’s name in object 1 to the person’s name in object 2, if object1 name is less than object 2 name, return TRUE else you will return FALSE.  This function will be used as the third argument to the standard sort call.  We have to create a function for the sort to use because we are trying to sort class objects that have many variables – the function allows us to define what variables in our class objects gets used in the comparison for sorting (otherwise the sort function wouldn’t know how to sort in our class objects, simple arrays or vectors do not need this function).

 

Create a people array or vector (your choice) of the person class — if you use an array you will have to set an upper limit on how many people can be entered like 100 or some value like that.

 

The flow of your program will be:

  • Ask for ID, store in your people array/vector person object

  • Ask for Name, store in your people array/vector person object – use the following code to make sure the keyboard buffer is clear before reading in your name string from the keyboard (previous ID question can leave newline character on the buffer)
    cin.clear();
    cin.ignore(numeric_limits<streamsize>::max(), ‘n’);
         getline(cin,name);

  • Ask for Height (feet and inches), store in your people array/vector person object

  • Ask for Weight, store in your people array/vector person object

  • Keep repeating these previous steps of asking and storing the values into new people array elements or new vectors elements of your person object until ID = -1 (or less than 0)

  • Now sort based on person object name in your people array or vector, review syntax for sort from 10/26 (arrays) and 10/28 (vectors) lectures, with the name of your “normal” sort helper function you created before as your third argument to the sort call.

  • Now loop through your array or vector and do the following

  • Print ID

  • Print Name

  • Print BMI

  • Print BMI Classification

 

Remember to write this in baby steps compiling a little bit at a time – do not try to write all the methods at once and run it, it is much easier to troubleshoot by adding only a few lines of code and compile to see how that works.  For example on this program – write the ID methods first, do not write any other methods until you get the ID methods working for storing and returning the ID – write the storing one first make you get no errors then write the return method next verifying the store method worked.  Once that is working, create the Name methods using the same way. etc.  Once all your methods work correctly with one person, create your array or vector of many people, etc.  Lastly sort your array or vector.  You build this up slowly is much easier to troubleshoot — add a few (1-9) lines not 10’s/100’s of lines before you compile and check what you just added, if you have a problem it is most likely in those last few lines of code you just added/changed.

 

Example program run:

 


This program will ask for a group of people’s ID#, Name, Height, and Weight – after entering everyone in a report will be shown, showing each person BMI and classification.

 

Please enter ID (-1 to quit) = 55

Please enter Name : Job B.

Please enter height (feet and inches) : 6 0

Please enter weight in pounds : 245

Please enter ID (-1 to quit) = 45

Please enter Name : Frank G.

Please enter height (feet and inches) : 5 9

Please enter weight in pounds : 175

Please enter ID (-1 to quit) = 23

Please enter Name : Linda Q.

Please enter height (feet and inches) : 5 4

Please enter weight in pounds : 142

Please enter ID (-1 to quit) = 88

Please enter Name : Anna L.

Please enter height (feet and inches) : 6 2

Please enter weight in pounds : 138

Please enter ID (-1 to quit) = -1

 

    Person  #: 88

         Name: Anna L.

          BMI: 17.7162

Classification: Underweight

    Person  #: 45

         Name: Frank G.

          BMI: 25.8402

Classification: Overweight

    Person  #: 55

         Name: Job B.

          BMI: 33.2243

Classification: Obese

    Person  #: 23

         Name: Linda Q.

          BMI: 24.3716

Classification: Normal Weight

ResearchPaperWriters.com’s pool of top-level writers is a testament to its dedication to quality. The website carefully selects its writers, ensuring they possess advanced degrees and a proven track record of academic writing excellence. This commitment to excellence translates into papers that not only meet but often exceed the expectations of clients, contributing to the platform’s well-deserved reputation as the best in the business. Affordability is another key aspect that makes ResearchPaperWriters.com the best academic writing website. The platform understands the financial constraints that students often face and strives to provide cost-effective solutions. Clients can benefit from discounts and bonuses that help make these high-quality services accessible. These financial incentives, in conjunction with exceptional writing quality, make ResearchPaperWriters.com the go-to choice for academic assistance.

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.