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 because of sensitive privacy and security concerns, among others. [We address such concerns in later exercises.] Computerizing health records could make it easier for patients to share their health profiles and histories among their various health-care professionals. This could improve the quality of health care, 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). Your class should have a constructor that receives this data. For each attribute, provide set and get methods. The class also should include methods that calculate and return the user’s age in years, maximum heart rate and target-heart-rate range (see Exercise 3.16), and body mass index (BMI; see Exercise 2.33). Write a Java app that prompts for the person’s information, instantiates an object of class HealthProfile for that person and prints the information from that object—including the person’s first name, last name, gender, date of birth, height and weight—then calculates and prints the person’s age in years, BMI, maximum heart rate and target-heart-rate range. It should also display the BMI values chart from Exercise 2.33.
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
- 6) Decryption (Substitution Cipher): The following is a substitution cipher. The letters are substituted randomly. Remember that this is a not shift cipher like the Caesar cipher. What does the following quote say? Who said it? Do this by hand. How long did it take you to decipher this message? D'Y JR EAWPD GTCTZ OTTA DYIRZBWGB, DB PRTJ KRYIADKWBT ADOT! TATWGRZ ZRRJTCTABarrow_forwardpizza (python)Mario owns a pizzeria. Mario makes all of his pizzas from 10 different ingredients, using 3 ingredients on each pizza. Mario’s cousin Luigi owns a pizzeria as well. Luigi makes all his pizzas from 9 ingredients, using 4 ingredients on each pizza. Mario and Luigi have made a bet: Mario believes that customers can order a larger selection of pizzas in his pizzeria than they can order in Luigi’s pizzeria. Use functions for this assignment. Implement a factorial() function yourself (do not use the one from the math module) When choosing k items from n possible items, the number of possibilities can be obtained using the following formula: (??)=?!?!(?−?)!(nk)=n!k!(n−k)! Make a function called choose with two parameters n and k, that implements the above formula. Write a program that calculates the number of pizzas Mario and Luigi can make. The outcome should look like this: Mario can make 120 pizzas.Luigi can make 126 pizzas. Luigi has won the bet.arrow_forwardProblem C. Front Tooth ConcealmentYou have recently been appointed vice principal of a high school, and as such, you have the honor of helping out with their graduation ceremony. You will alternate reading off the names of the graduates with the principal. Unfortunately, you got your front teeth knocked out last night while fighting crime as a masked vigilante, so you are unable to pronounce any name containing the letters ‘s’ or ‘z’. Since you don’t want your enemies to learn of your secret identity, and you suspect that some of them may be present at graduation, you need to avoid saying any names containing the letters ‘s’ or ‘z’. You will read the first name from the list of graduates, meaning that you will also read the third, the fifth, the seventh, and so on. Therefore, you must ensure that all names at odd positions in the list of names (or at even indexes, since we start indexing at 0), do not contain the letters ‘s’ or ‘z’. Write a function avoid_sz(names_list) which takes in…arrow_forward
- what does this mean? (JAVA)arrow_forward(SQL Table) ERD for the University database Narrative Description of the University Database Students take courses at the university. A student can serve as a mentor for one or more other students, but he/she is not required to do so. Further, each student can have one other student as his/her mentor, but this, too, is not required. A student, however, is required to be assigned to one and only one faculty member. In turn, a faculty member advises many students but is not required to advise any students. Courses are offered in multiple sections. A course consists of a prefix as well as a course number. For example, in this course, CSIS is the course prefix, and 325 is the course number. CSIS 325 is offered in multiple sections, some residentially and some online. All residential sections must be taught in a classroom on a campus; whereas online classes are not assigned to a classroom. Sections are represented by a three-digit section number such as 001, 002, B01, etc. A given…arrow_forwardProgramming Language: use Python pleasearrow_forward
- ANSWER IN PYTHON. THIS IS A CODING PROBLEM.arrow_forwardPlease try to solve it in one hourarrow_forwardRead this:Selective Service Registration Registration with the Selective Service is mandatory in America. The law states "it is the duty of every male citizen of the United States between the ages of 18 and 25, to register." The law does not require women to register. Failure to register for selective service is a crime. If found guilty, a person could be fined up to $250,000. They might also receive a sentence of five years in prison. All men over 18 should register online at the Selective Service System website (www.sss.gov). Registration can also be done at any US Post Office. It is a duty that allows for freedom in America. Explain the purpose for registering with the Selective Service System. Is this action a duty or a responsibility?arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr