INSTRUCTIONS: 1. Write your name and matric number as a comment on top of your class...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
INSTRUCTIONS: 1. Write your name and matric number as a comment on top of your class name (for each class). 2. The project name must be created using this format A212_STIA1123_Asgn2_<matric number>. For example: A212_STIA1123_ Asgn2_12345 3. Zip or compress the project name/folder using winzip or winrar. The compressed file will be A212_STIA1123_Asgn2_12345.zip or A212_STIA1123_Asgn2_12345.rar 4. Submit the zip file into UUMOL. 5. The due date is on 7 July 2022 11.59 PM. Late submission will get 0 mark. QUESTION You are required to develop a system to calculate a Body Mass Index (BMI) for each student. The Interface of this system is as follows: Matric Number Name BMI Calculator Program University Weight (in KG) Assignment 2 (Individual Assignment) Height (in meter) BMI Status STIA1123 PROGRAMMING 2 Calculate BMI Degree Save Master Please select your university Reset Display All o matric number as integer o name as string o weight as double o height as double o bmi as double O status as string Search by Matric No Update X Text area Based on the diagram, a user needs to enter the value of matric number, name, program, university, weight, and height. A user is not allowed to enter the value for bmi and status. The GUI component and data type that you need to include in the system are as follows: • Text Field for the information of • Combo Box o university as string o The items in the combo box are Please select you university, UUM, UKM, and USM . Radio Button o Two radio buttons for degree and master. Both values must be assigned as program. The data type for program is string. These radio button must be grouped in a button group Button Group o It is used to group both radio buttons to allow a user to choose either one. Text Area o To display all records that entered by a user. Action Button - It is used to o Calculate BMI ▪ It will calculate the BMI and status based on the height and weight o Save o ▪ It will store a record/ data into an array of object NOT in ArrayList. Reset ▪ It will reset all GUI component to be empty (text field and text area), set to the first item (combo box), to be not selected (radio button) o Display All Class Student It will display all records (that stored in the array of object) in the text area. Search by Matric Number . When the record is found, it will display all information in all related GUI components except text area. This system will involve three classes namely BMI Form, Student, and Student Operation. The details of the classes are as follows: 1. This class of Student contains 8 private instance variables such as matric number, name, program, university, weight, height, bmi, and status. 2. The class also has a constructor with 8 parameters that will represent all the instance variables. The constructor is used to store a current object that contains a record of student information 3. The class also has 8 public getter methods. Class StudentOperation 1. This class contains ONE private instance variable that will refer to the declaration of array of object from the Student class. 2. The class has one constructor without parameter. The constructor is used to create the array of object. The size of the array is 5. 3. Apart from that, this class has another five methods. a. These methods have public access modifier. b. In term of return type (void or any data type) and parameter (with/without parameter(s)) for each method, it depends on your creativity how you design them. The methods that must be included in this class are: i calculateBMI () It will calculate the BMI based on the value of height and weight through this formula bmi = weight / (height x height) ii. getStatus BMI () This method will get status based on the bmi that you have already calculated. The status is based on the table below: iii. iv. V. BMI range More than 35.0 From 30.1 to 35.0 From 25.1 to 30.0 From 18.6 to 25.0 From 16.0 to 18.5 Less than 16.0 saveRecord() It will add record into an array of object.. Class BMI Form readAllRecord () It will read all records/ data from the array of object. O searchRecord () It will search a record based on the matric number from the array of object using sequential/ linear search. o Initialize value -1 to the ind variable 1. This class refers to the graphical user interface (GUI) class. This class is developed using JFrame Form. 2. This class has 3 private instance variables namely o ind-the data type is integer. It refers to the value of index o operation - the data type is the Student Operation class. This object reference variable is used to call all methods from the StudentOperation class. o Stud -the data type is Student class. It used to create an object from the Student class and retrieve information from the Student class 3. This class contains ONE constructor without parameter (created automatically by Netbeans). In the constructor, you must Severely Obese Moderately Obese Overweight Normal Weight Underweight Severely Underweight o Create object for the Student Operation class. 4. Process on Action Button which contains the text of: o Calculate BMI status Save When this button is clicked on, it will get/ retrieve the data that entered by a user namely weight and height from the respective GUI components. Then, the button will calculate the BMI and get the BMI status based on the input weight and height via calling the calculateBMI () and getStatusBMI methods The value of BMI and BMI status will be displayed based on the respective text fields. When this button is clicked on, it will get/ retrieve the data that entered by the user namely matric, name, program, university, weight, height, bmi, and status from the respective GUI components After that, those values will be stored in an object that created from the Student class. The information also is stored into the object via calling the constructor of the Student class. (REMEMBER: For each time, the button "save" is clicked, the value of ind will be increased by 1 that will cater on the index value of array of object) Then, store the object into the array of object via calling saveRecord (). After adding the record into the array of object, you must display a message of "The record has been saved successfully in the array of object" in the text area o Reset When this button is clicked on, It will reset all GUI component to be empty (for text field and text area), set to the first item (for combo box), set to be not selected (for radio buttons) o Display All When this button is clicked on It will display all records (stored in the array of object) in the text area. In this part, system will call the readAllRecord () method to read all records that stored in the array of object. o Search by Matric Number When this button is clicked on, you need to retrieve matric number that entered by a user. Then, it will find a record based on the matric number. When the record is found, it will display all information in all related GUI components except text area. If it is not found, display a message of "The record is not found" in the text area. This operation needs you to call the searchRecord () method to implement the searching. INSTRUCTIONS: 1. Write your name and matric number as a comment on top of your class name (for each class). 2. The project name must be created using this format A212_STIA1123_Asgn2_<matric number>. For example: A212_STIA1123_ Asgn2_12345 3. Zip or compress the project name/folder using winzip or winrar. The compressed file will be A212_STIA1123_Asgn2_12345.zip or A212_STIA1123_Asgn2_12345.rar 4. Submit the zip file into UUMOL. 5. The due date is on 7 July 2022 11.59 PM. Late submission will get 0 mark. QUESTION You are required to develop a system to calculate a Body Mass Index (BMI) for each student. The Interface of this system is as follows: Matric Number Name BMI Calculator Program University Weight (in KG) Assignment 2 (Individual Assignment) Height (in meter) BMI Status STIA1123 PROGRAMMING 2 Calculate BMI Degree Save Master Please select your university Reset Display All o matric number as integer o name as string o weight as double o height as double o bmi as double O status as string Search by Matric No Update X Text area Based on the diagram, a user needs to enter the value of matric number, name, program, university, weight, and height. A user is not allowed to enter the value for bmi and status. The GUI component and data type that you need to include in the system are as follows: • Text Field for the information of • Combo Box o university as string o The items in the combo box are Please select you university, UUM, UKM, and USM . Radio Button o Two radio buttons for degree and master. Both values must be assigned as program. The data type for program is string. These radio button must be grouped in a button group Button Group o It is used to group both radio buttons to allow a user to choose either one. Text Area o To display all records that entered by a user. Action Button - It is used to o Calculate BMI ▪ It will calculate the BMI and status based on the height and weight o Save o ▪ It will store a record/ data into an array of object NOT in ArrayList. Reset ▪ It will reset all GUI component to be empty (text field and text area), set to the first item (combo box), to be not selected (radio button) o Display All Class Student It will display all records (that stored in the array of object) in the text area. Search by Matric Number . When the record is found, it will display all information in all related GUI components except text area. This system will involve three classes namely BMI Form, Student, and Student Operation. The details of the classes are as follows: 1. This class of Student contains 8 private instance variables such as matric number, name, program, university, weight, height, bmi, and status. 2. The class also has a constructor with 8 parameters that will represent all the instance variables. The constructor is used to store a current object that contains a record of student information 3. The class also has 8 public getter methods. Class StudentOperation 1. This class contains ONE private instance variable that will refer to the declaration of array of object from the Student class. 2. The class has one constructor without parameter. The constructor is used to create the array of object. The size of the array is 5. 3. Apart from that, this class has another five methods. a. These methods have public access modifier. b. In term of return type (void or any data type) and parameter (with/without parameter(s)) for each method, it depends on your creativity how you design them. The methods that must be included in this class are: i calculateBMI () It will calculate the BMI based on the value of height and weight through this formula bmi = weight / (height x height) ii. getStatus BMI () This method will get status based on the bmi that you have already calculated. The status is based on the table below: iii. iv. V. BMI range More than 35.0 From 30.1 to 35.0 From 25.1 to 30.0 From 18.6 to 25.0 From 16.0 to 18.5 Less than 16.0 saveRecord() It will add record into an array of object.. Class BMI Form readAllRecord () It will read all records/ data from the array of object. O searchRecord () It will search a record based on the matric number from the array of object using sequential/ linear search. o Initialize value -1 to the ind variable 1. This class refers to the graphical user interface (GUI) class. This class is developed using JFrame Form. 2. This class has 3 private instance variables namely o ind-the data type is integer. It refers to the value of index o operation - the data type is the Student Operation class. This object reference variable is used to call all methods from the StudentOperation class. o Stud -the data type is Student class. It used to create an object from the Student class and retrieve information from the Student class 3. This class contains ONE constructor without parameter (created automatically by Netbeans). In the constructor, you must Severely Obese Moderately Obese Overweight Normal Weight Underweight Severely Underweight o Create object for the Student Operation class. 4. Process on Action Button which contains the text of: o Calculate BMI status Save When this button is clicked on, it will get/ retrieve the data that entered by a user namely weight and height from the respective GUI components. Then, the button will calculate the BMI and get the BMI status based on the input weight and height via calling the calculateBMI () and getStatusBMI methods The value of BMI and BMI status will be displayed based on the respective text fields. When this button is clicked on, it will get/ retrieve the data that entered by the user namely matric, name, program, university, weight, height, bmi, and status from the respective GUI components After that, those values will be stored in an object that created from the Student class. The information also is stored into the object via calling the constructor of the Student class. (REMEMBER: For each time, the button "save" is clicked, the value of ind will be increased by 1 that will cater on the index value of array of object) Then, store the object into the array of object via calling saveRecord (). After adding the record into the array of object, you must display a message of "The record has been saved successfully in the array of object" in the text area o Reset When this button is clicked on, It will reset all GUI component to be empty (for text field and text area), set to the first item (for combo box), set to be not selected (for radio buttons) o Display All When this button is clicked on It will display all records (stored in the array of object) in the text area. In this part, system will call the readAllRecord () method to read all records that stored in the array of object. o Search by Matric Number When this button is clicked on, you need to retrieve matric number that entered by a user. Then, it will find a record based on the matric number. When the record is found, it will display all information in all related GUI components except text area. If it is not found, display a message of "The record is not found" in the text area. This operation needs you to call the searchRecord () method to implement the searching.
Expert Answer:
Answer rating: 100% (QA)
def initself selfstudents def addstudentself name height weig... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Predictive text entry systems are familiar on touch screens and mobile phones. This question asks you to consider how the same principles might be used in a programming editor for creating Java code....
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
A total weighted score of in an External Factor Evaluation (EFE) Matrix indicates that an organization is responding in an outstanding way to existing opportunities and threats in its industry. Oa....
-
Data for Green Lawn Care Ltd. were presented in E3-1. 1. Issued common shares to shareholders in exchange for cash. 2. Paid monthly rent. 3. Purchased equipment on account. 4. Billed customers for...
-
Find four consecutive integers such that the sum of the first three is 54 more than the fourth.
-
CMS is a claims processing company in Mobile, Alabama. Chastity Jones, a black woman, completed an online employment application for a customer service position with CMS. Jones interviewed with a...
-
Dimitry Chernitsky is seeking part-time employment while he attends school. He is considering purchasing technical equipment that will enable him to start a small training services company that will...
-
As a X Engineer in a design consultancy company, you have purchased a high specification computing system. The computing system has a cost basis of USD 4 0 0 0 and a ten - year depreciable life. The...
-
Suppose a firm will invest $ 5 0 0 today, $ 6 0 0 a year from now, $ 7 0 0 two years from now, $ 8 0 0 three years from now, and $ 9 0 0 four years from now. What will the future value of the project...
-
Last week, Bayonetta opened a new wealth management account at the Capital Bank of Noatun to begin saving for retirement. Today, Bayonetta deposited $135,000 into her account. She then plans to make...
-
How do theories of class consciousness and class struggle elucidate the role of collective action, social movements, and political mobilization in challenging existing class structures and advocating...
-
15. Profit Margin: Juno, Inc. has a profit margin of 4.8 percent and a Total Asset Turnover of 1.16. The net profit is $420 and the tax rate is 35 percent. What are the total sales for the period?
-
How does class intersect with other social categories such as race, gender, and nationality, shaping individuals' experiences of privilege and disadvantage within complex social hierarchies?
-
The case presents five potential allocation bases for assigning the company's $300,000 in plant-administration costs. Using the five years of data presented in case Exhibit 4, you should hypothesize...
-
Vince, Inc. has developed and patented a new laser disc reading device that will be marketed internationally. Which of the following factors should Vince consider in pricing the device? I. Quality of...
-
Larry Gaines, age 42, sells his personal residence on November 12, 2012, for $144,000. He lived in the house for 7 years. The expenses of the sale are $10,500, and he has made capital improvements of...
-
Please answer the following questions regarding the taxability of Social Security: a. A 68-year-old taxpayer has $20,000 in Social Security income and $100,000 in tax-free municipal bond income. Does...
-
a. Wilson filed his individual tax return on the original due date, but failed to pay $700 in taxes that were due with the return. If Wilson pays the taxes exactly 2 months late, calculate the amount...
-
Find the state vector via the formal-solution approach. \(\dot{\mathbf{x}}=\left[\begin{array}{cc}5 & 1 \\ -4 & 1\end{array} ight] \mathbf{x}+\left[\begin{array}{c}1 \\ -1\end{array} ight] u, \quad...
-
A nonlinear dynamic system is described by a. Use the Simulink model to plot x 2 ( t ) x 2 ( t ) . b. Derive the linearized model analytically, build its Simulink model where the linear model is...
-
Consider the mechanical system in Figure 8.28. Assuming \(m=12 \mathrm{~kg}\), \(b=20 \mathrm{~N}\)-sec \(/ \mathrm{m}, k=200 \mathrm{~N} / \mathrm{m}, F_{0}=47 \mathrm{~N}\), and \(\omega=5...
Study smarter with the SolutionInn App