Placeholder

CIS355A Week 2 Lab Developing a GUI Application

$19.00

Description

OBJECTIVES
Create a GUI that usesJTextField, JLabel, and JButton.
Write event handlers to process user data.
PROBLEM: Health Profile App
GymsRUs would like to replace their console program with an updated app using a graphical user interface. You will use the HealthProfile class that you created in the Week 1 Lab and build a GUI for it.
FUNCTIONAL REQUIREMENTS
Make sure your HealthProfile class from the Week 1 Lab is in a named package, not default (i.e., package lab1).
You must ADD the project that contains the HealthProfile class to this week’s project by
right click project, go to properties; and
click Libraries, Add Project, click OK.
Then you will be able to reference your existing class as
import lab1.HealthProfile.
Your project will have three classes:
HealthProfile class from Week 1 Lab
HealthProfileGUI class
Lab2Main class
Your HealthProfildGUI class should have the following components (see sample GUI below):
JTextField objects to enter: name, age, height in feet, height in inches, weight in pounds
JButton objects to display results, clear the GUI
JTextField objects to display the BMI, category, and max heart rate
JLabels to describe all textboxes
You are free to layout and design your GUI as you like as long as it includes these components.
Add default and parameterized constructors to your HealthProfile class. The parameterized constructor should have five arguments: the name, age, weight, height in feet, and height in inches. Note it should convert the height to inches to store in the private instance variable.
Code event handlers for each button:
Display: Make sure all user input is present and valid
Use the HealthProfile class to process the data
Display the results on the GUI
Clear Clear all text boxes on the GUI
Sample GUI
CODE STYLE REQUIREMENTS
Include meaningful comments throughout your code
Use meaningful names for variables
Code must be properly indented
Include a comment header at beginning of each file, example below
/****************************************************
Program Name: ProgramName.java
Programmer’s Name: Student Name
Program Description: Describe here what this program will do
***********************************************************/
DELIVERABLES
Submit as a SINGLE zip folder
All java files
Lab report
Follow assignment specification regarding class/method names.
Note that your java filename must match class name (DO NOT rename).
SCREENSHOTS
SOLUTION
PAYMENT
The solution includes a zip file.
Attachments [Move over files to preview content of those files]
CIS355A_Week_2_Lab.zip (308.98 KB)
CIS355A-Week-2-Lab-Report-Screenshot.png
CIS355A-Week-2-Lab-Screenshot.png
CIS355A_Lab2_Report.docx
Java code
HealthProfile.java
HealthProfileGUI.java
Lab2Main.java
Netbeans project
CIS355AWeek2Lab
build
classes
.netbeans_automatic_build
.netbeans_update_resources
HealthProfile.class
HealthProfileGUI.class
lab1
HealthProfile.rs
Lab2Main.class
build.xml
manifest.mf
nbproject
build-impl.xml
genfiles.properties
private
private.properties
private.xml
project.properties
project.xml
src
HealthProfileGUI.java
lab1
HealthProfile.java
Lab2Main.java
test
Preview HealthProfile.java
xxxxxx xxxxxxxxxxxxx() {
}
xxxxxx xxxxxxxxxxxxx(xxxxxx _xxxx, xxx _xxx, xxxxxx x_xxxxxx, xxxxxx x_xxxxxx,xxxxxx _xxxxxx) {
setName(_name); setAge(_age); setWeight(_weight); setHeight(f_height, i_height); }
public void setName(String _name) { this.name = _name; }
public String getName() { return name;
}
xxxxxx xxxx xxxxxx(xxx _xxx) {
xxxx.xxx = _xxx;
}
Preview HealthProfileGUI.java
xxxxxx xxxxx xxxxxxxxxxxxxxxx xxxxxxx xxxxxx {
xxxxxx xxxxxxxxx = xxx xxxxxx(“xxxx”);
xxxxxx xxxxxxxx = xxx xxxxxx(“xxx”);
xxxxxx xxxxxxxxxxx = xxx xxxxxx(“xxxxxx”);
JLabel heightInchesLabel = new JLabel(“Height-inches”); JLabel heightFeetLabel = new JLabel(“Height-feet”); JLabel bmiLabel = new JLabel(“BMI”); JLabel categoryLabel = new JLabel(“Category”); JLabel heartRateLabel = new JLabel(“Max Heart Rate”); TextField nameTextField = new TextField(); TextField ageTextField = new TextField(); TextField weightTextField = new TextField(); TextField heightInchesTextField = new TextField(); TextField heightFeetTextField = new TextField(); TextField bmiTextField = new TextField(); TextField categoryTextField = new TextField();
xxxxxxxxx xxxxxxxxxxxxxxxxxx = xxx xxxxxxxxx();
xxxxxxx xxxxxxxxxxxxx = xxx xxxxxxx(“xxxxxxx”);
xxxxxxx xxxxxxxxxxx = xxx xxxxxxx(“xxxxx”);
xxxxxxxxxxxxx xxxxxxx;
xxxxxx xxxxxxxxxxxxxxxx(xxxxxx xxxxx) {
Preview Lab2Main.java
public class Lab2Main {
public static void main(String[] args) { HealthProfileGUI gui = new HealthProfileGUI(“Health Profile”);
}
}
Preview HealthProfileGUI.java
xxxxxx xxxxx xxxxxxxxxxxxxxxx xxxxxxx xxxxxx {
xxxxxx xxxxxxxxx = xxx xxxxxx(“xxxx”);
xxxxxx xxxxxxxx = xxx xxxxxx(“xxx”);
xxxxxx xxxxxxxxxxx = xxx xxxxxx(“xxxxxx”);
JLabel heightInchesLabel = new JLabel(“Height-inches”); JLabel heightFeetLabel = new JLabel(“Height-feet”); JLabel bmiLabel = new JLabel(“BMI”); JLabel categoryLabel = new JLabel(“Category”); JLabel heartRateLabel = new JLabel(“Max Heart Rate”); TextField nameTextField = new TextField(); TextField ageTextField = new TextField(); TextField weightTextField = new TextField(); TextField heightInchesTextField = new TextField(); TextField heightFeetTextField = new TextField(); TextField bmiTextField = new TextField(); TextField categoryTextField = new TextField();
xxxxxxxxx xxxxxxxxxxxxxxxxxx = xxx xxxxxxxxx();
xxxxxxx xxxxxxxxxxxxx = xxx xxxxxxx(“xxxxxxx”);
xxxxxxx xxxxxxxxxxx = xxx xxxxxxx(“xxxxx”);
xxxxxxxxxxxxx xxxxxxx;
xxxxxx xxxxxxxxxxxxxxxx(xxxxxx xxxxx) {
Preview HealthProfile.java
xxxxxx xxxxxxxxxxxxx() {
}
xxxxxx xxxxxxxxxxxxx(xxxxxx _xxxx, xxx _xxx, xxxxxx x_xxxxxx, xxxxxx x_xxxxxx,xxxxxx _xxxxxx) {
setName(_name); setAge(_age); setWeight(_weight); setHeight(f_height, i_height); }
public void setName(String _name) { this.name = _name; }
public String getName() { return name;
}
xxxxxx xxxx xxxxxx(xxx _xxx) {
xxxx.xxx = _xxx;
}
Preview Lab2Main.java
public class Lab2Main {
public static void main(String[] args) { HealthProfileGUI gui = new HealthProfileGUI(“Health Profile”);
}
}
Price: $19
Buy Now
Checkout
Added to cart
Buy More Save More
Buy at least TWO items & save up to 30% OFF your ENTIRE order!
Rack up instant rebates in your shopping cart. Simply add items to your cart, and see the savings add up.
Discounts will automatically be applied on eligible orders.
CIS355A Week 2 Lab Health Profile App – $19.00
CIS355A Week 3 Lab BurgersRUs Point of Sale system – $19.00
CIS355A Week 4 Lab Stocks4U Portfolio Management System – $19.00
CIS355A Week 5 Lab File Processing Stocks4U Portfolio Management System – $19.00
CIS355A Week 6 Lab Student Management System – $19.00
CIS355A Week 4 Course Project Flooring Application Analysis and Design – $19.00
CIS355A Week 7 Course Project Flooring Application User Manual and Application Code – $25.00
Add to Cart
Checkout
Added to cart
You May Also Like:
CIS355A Entire Course
CIS355A Week 1 Lab Developing an OOP Console Application
CIS355A Week 3 Lab BurgersRUs Point of Sale system
CIS355A Week 4 Lab Stocks4U Portfolio Management System
CIS355A Week 4 Course Project Flooring Application Analysis and Design
CIS355A Week 5 Lab File Processing Stocks4U Portfolio Management System
CIS355A Week 6 Lab Student Management System
CIS355A Week 7 Course Project Flooring Application User Manual and Application Code

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.