Posted on

Help with C thanksQuestion 1 Implement a C program and explain the syntax and use of data

Help with C++ thanks.Question 1. Implement a C++ program and explain the syntax and use of data structures such as structures and class. Question 1a. Define a structure named Person using the C++ language to hold A string representing the name of the person. A float representing the BMI of the person. An integer representing the age of the person. A bool representing the Singapore nationality status of the person.Question 1b. Implement a main function to demonstrates the use of the structure defined in question 1a. The function declares an array of ten person items. Define the last element in the array as follows: name : “John Tan”, bmi : 25.12, age : 34, nationality : trueQuestion 1c.Modify the program in question 1a and 1b by converting the structure in question 1a to a C++ class. Implement a main function that performs the same tasks as required in question 1b using the C++ class you have just defined. Write your C++ code without changing the variable names described above. In addition, you may add your own variables if necessary but do not include other functions that are not needed here.


 
Solved By Verified
Study Co-Pilot All Study Co-Pilots are evaluated by Gotit Pro as an expert in their subject area.

 
Instant
Download

Student review: (3 ratings) 3 out of 3 people found this solution helpful.