Concept explainers
(Computerization of Health Records) A health-care issue that has been in the news lately is the computerization of health records. This possibility is being approached cautiously of sensitive privacy and security concerns, among others. [We address such concerns in later exercises.]
Computerizing health records could make easier for patients to share their health profiles and histories among their various health-care professionals. This could improve the quality of health help avoid drug conflicts and erroneous drug prescriptions, reduce costs and, in emergencies, could save lives. In this exercise, you'll design a "starter" HealthProfile class for a person. The Class attributes should include the person 's first name, last name, gender, date of birth (consisting of separate attributes for the month, day and year of birth), height (in inches) and weight (in pounds). You: class should have a constructor that receives this data. For each attribute, provide set and get functions.
The class also should include member functions that calculate and return the user's age in years.
maximum heart rate and target-heart-rate range (see Exercise 3.15), and body mass index see
Exercise 2.30). Write a
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
C++ How to Program (10th Edition)
- determing the test case using the decision table. (software quality engineering)arrow_forwardPlease try to solve it in one hourarrow_forwardAssociations between variables: (Python + Report) Compute the sample correlation coefficient between the time spent on the website, the number of pages viewed, and the dollar amount spent using Python. Include your findings in your report and comment on your findings. You should calculate pairwise correlation between these three variables (three correlation coefficients in total) and comment on all. What types of relationships exist between these variables?arrow_forward
- 14arrow_forward(C PROGRAMMING ONLY) 5. Making a Kid From Two Personsby CodeChum Admin `The population is slowly decreasing! It's now time to enable these Persons to create their own. But we need to be careful. The overall gender distribution of the Persons should always be maintained (i.e. the Male should be nearly equal as the female) so that gender equality can be easier to maintain. Here is the guide in determining the gender of the newly created Person: If the father is older than the mother, then the child is MaleIf the mother is older than the father, then the child is FemaleIf the father's age is equal to the mother's age and the age is even, then the child is MaleIf the father's age is equal to the mother's age and the age is odd, then the child is Female What are you waiting for, let's settle this problem once and for all! Instructions: In the code editor, you are provided with the definition of a struct Person. This struct needs an integer value for its age and a character value for…arrow_forward(Perkovic, Problem 6.31a) Craps is a single player dice game, that proceeds as follows: 1. the player rolls 2 six-sided dice once 。 if the total is 7 or 11, the player wins o if the total is 2, 3 or 12, the player loses 。 otherwise, the game continues, ... see 2 ... 2. the player the continues to roll the dice repeatedly, until ... 。 the total is the same as the original total (from 1), in which case the player wins 。 the total is 7, in which case the player loses Write a function craps that simulates a single game of craps (may be many rolls) and returns 1 if the player wins and 0 otherwise. 1 >>> import random 2 >>> random.seed(0) 3 >>> craps () 4 5 0 >>> random.seed(1) 6 LO 7 1 8 >>> craps () >>> random.seed(2) 9 >>> craps () 10 0 11 12 >>> [ (i, random.seed(i), craps()) for i in range(20)] [(0, None, 0), (1, None, 1), (2, None, 0), (3, None, 1), (4, None, 0), (5, None, 1), (6, None, 0), (7, None, 1), (8, None, 0), (9, None, 0), (10, None, 1), (11, None, 1), (12, None, 1), (13,…arrow_forward
- (CHOOSE ALL) Which of the following are reasons for the privacy paradox? You can not ask users about their privacy, you can only observe their behaviors O Privacy behaviors are very contextual Users are willing to give information if they get value from doing so O Users really do not care about their privacy, they just do not want to admit itarrow_forward[Job sequencing using deadlines]Let us suppose that there are n jobs (J1, J2, … Jn) each of which takes a unit oftime to be processed by a machine and there is just one single machine to processthe jobs. Let us suppose that (d1, d2, d3, …dn) are the deadlines in units of times to complete the jobs and (p1, p2, p3, …pn) are the profits earned if the jobs are processed within the deadline. The objective is obviously to select those jobs and complete them within their deadlines so that maximum profit is earned.Design a greedy method to obtain the optimal sequence of jobs that will earnmaximum profits. Demonstrate it on the case where there are four jobs, with n = 4,deadlines given by (d1 = 2, d2 = 1, d3 = 3, d4 = 1) and profits earned as (p1 = 100,p2 = 20, p3 = 50, p4 = 40).arrow_forward(C PROGRAMMING ONLY) 4. Breaking the Codeby CodeChum Admin ATTENTION SOLDIER! This will be the hardest mission of your life. Our intelligence department has caught the enemy sending codes from one base to another. These enemy codes can either be a simple communication message or a mastermind plan. Our intelligence department has determined that a mastermind plan is a code that has at least 1 consonant character. Since you know programming, your task is to check a code if it is a mastermind plan or not. Instructions: In the code editor, you are provided with a main() function that asks the user for a code. Furthermore, there is a call to the function, hasConsonant().Your task is to declare and define this hasConsonant() function which has the following details:Return type - intName - hasConsonantParameter:char* - to hold the character arrayReturn value - 1 if there is at least 1 consonant and 0 if there is none. Be sure to consider both the capital and small letter consonants…arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrFundamentals of Information SystemsComputer ScienceISBN:9781337097536Author:Ralph Stair, George ReynoldsPublisher:Cengage LearningA+ Guide To It Technical SupportComputer ScienceISBN:9780357108291Author:ANDREWS, Jean.Publisher:Cengage,