CIS355A Entire Course tutorial includes:
OBJECTIVES
PROBLEM: Health Profile Console Program
GymsRUs has a need to provide fitness/health information to their clients, including BMI and maximum heart rate. Your task is to write a console program to do this.
Body mass index (BMI) is a measure of body fat based on a person’s height and weight. BMI can be used to indicate if you are overweight, obese, underweight, or normal.The formula to calculate BMI is
FUNCTIONAL REQUIREMENTS
Design and code a class called HealthProfile to store information about clients and their fitness data. The attributes (name, age, weight, and height) are private instance variables. The class must include the following methods.
method, | description |
---|---|
setName, | Receives a value to assign to private instance variable |
setAge, | Receives a value to assign to private instance variable |
setWeight, | Receives a value to assign to private instance variable |
setHeight, | Receives TWO inputs (height in feet\, inches). Converts and stores the total INCHES in private instance variable |
getName, | Returns private instance variable |
getAge, | Returns private instance variable |
getWeight, | Returns private instance variable |
getHeight, | Returns private instance variable (inches) |
getBMI, | Calculates and returns BMI |
getCategory, | Returns category based on BMI |
getMaxHR, | Calculates and returns maximum heart rate |
Create a SEPARATE TEST CLASS, Lab1Main, to prompt for user input and display output using the HealthProfile class. Process multiple inputs using a loop.You can assume all user input is valid.
CODE STYLE REQUIREMENTS
/****************************************************
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
Follow assignment specification regarding class/method names.
Note that your java filename must match class name (DO NOT rename).
OBJECTIVES
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:
Your HealthProfildGUI class should have the following components (see sample GUI below):
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:
Sample GUI
CODE STYLE REQUIREMENTS
Follow assignment specification regarding class/method names.
Note that your java filename must match class name (DO NOT rename).
OBJECTIVES
PROBLEM: BurgersRUs Point of Sale system
Burger Barn needs a point of sale application. The products and prices are as follows.
Burgers: single $3.50, double $4.75
Add cheese: + $.50
Add bacon: + $1.25
Make it a meal: + $4.00
FUNCTIONAL REQUIREMENTS
You can code the GUI by hand or use NetBeans GUI builder interface.
The GUI should useJRadioButtonto choose single or double burger.
It should use JCheckBox for add ons.
JTextField for item price, order quantity, order total
JTextArea to display the receipt
Create a menu with the following options.
File Order
Exit Add to Order
Clear for next item
New Order
As the user selects items, the item price should be calculated and updated accordingly.
Note that quantity should default to 1. The user can change if needed.
Once choices are made and quantity is entered, process the order using the menu options.
Order—Add to Order Displays the choice and price in each text area.
Note that multiple items can accumulate in a single order
Updates the order total
Order—Clear for next item Clears the checkboxes. Note that quantity should default to 1
Order—New Order Clears the GUI and totals for a new order
File—Exit Exits the program. Use System.exit(0) commad.
CODE STYLE REQUIREMENTS
Follow assignment specification regarding class/method names.
Note that your java filename must match class name (DO NOT rename).
OBJECTIVES
PROBLEM: Stocks4U Portfolio Management System
Stocks4U needs to develop an app for you to manage your stock purchases.You should be able to store a list of stock purchases, view the individual stocks, add and remove stocks.
FUNCTIONAL REQUIREMENTS
You can code the GUI by hand or use NetBeans GUI builder interface.
The GUI should have two tabs usingJTabbedPane.
Create a Stock class to manage the stock activity. It should have private instance variables of
Create a default and parameterized constructor.
Create sets/gets for all instance variables.
Create a get method to calculate and return the profit or loss. This would be calculated as
1 | Number of shares * (current price – purchase price). |
Create toString to display the name of the stock.
As you add stocks, they are displayed in the JList.
If you select an element in the JList, the gain or loss is displayed in the label or text field.
If you select an element in the JList and click Remove, the stock is removed from the list.
CODE STYLE REQUIREMENTS
DELIVERABLES
Submit as a SINGLE zip folder
Follow assignment specification regarding class/method names.
Note that your java filename must match class name (DO NOT rename).
Developing a graphical user interface in programming is paramount to being successful in the business industry. This project incorporates GUI techniques with other tools that you have learned about in this class.
Here is your assignment: You work for a flooring company. They have asked you to be a part of their team because they need a computer programmer, analyst, and designer to aid them in tracking customer orders. Your skills will be needed in creating a GUI program that calculates the flooring cost and stores the order in the database.
The project has three components: an analysis and design document, the project code, and a user manual. The analysis and design document is due Week 4. The code and user manual are due in Week 7. It is suggested that you begin working on the code in Week 5, which should give you ample time to complete the project. You will find that the lectures and lab assignments will prepare you for the Course Project.
Guidelines
Your application must include at least three tabs. The user will choose wood flooring or carpet, enter the length and width of the floor, as well as the customer name and address. The application will compute the area of the floor and the cost of the flooring considering that wood floor is $20 per square foot and carpet is $10 per square foot. A summary should be displayed, either in a tab or another window, listing the customer name and address, floor selection, area, and cost. This information should also be stored in the MySQL database table. The program should validate that all information is entered and that the length and width are numeric values. Any numeric or currency values must be formatted appropriately when output. Recommendations for the components used for input are
Analysis and Design (Due Week 4)
In Week 4, you will complete the analysis and design for the project. You will use the guidelines described above and the grading rubric below to complete this document. You will create the following items:
Your application must include at least three tabs. The user will choose wood flooring or carpet, enter the length and width of the floor, as well as the customer name and address. The application will compute the area of the floor and the cost of the flooring considering that wood floor is $20 per square foot and carpet is $10 per square foot. A summary should be displayed, either in a tab or another window, listing the customer name and address, floor selection, area, and cost. This information should also be stored in the MySQL database table. The program should validate that all information is entered and that the length and width are numeric values. Any numeric or currency values must be formatted appropriately when output. Recommendations for the components used for input are
The MySQL database table is called flooring and has the following description:
Field | Type |
---|---|
CustomerName | varchar(30) |
CustomerAddress | varchar(50) |
FlooringType | varchar(10) |
FloorArea | Double |
FloorCost | Double |
In addition to entering new customer orders, your application should list all customer orders stored in the database. These will be viewed as a list, in a text area, and will not be updated by the user.
User Manual (Due Week 7)
Your actual Course Project and user manual are due at the end of Week 7. However, it is strongly recommended that you start your project in Week 5 to avoid many last minute issues.
In Week 7, you will be required to submit a user manual, as well as your Java code. The user manual can be a simple Word document with screenshots that explains how to run your application. Your mark will depend both on the program quality and the quality of the user manual.
Here are some more detailed guidelines about the user manual.
It does not need to be long, probably not more than 5 pages, including screenshots.
Write at the expected user’s level, not too technical.
Detail all the functionality that the application provides.
For each function, show what is its purpose and sample execution, with a screenshot.
User Manual | Points | Description |
---|---|---|
Sufficient length to describe the application | 5 | Manual contains explanation in detail of all relevant areas of the application |
Contains screenshots of the key interface components | 5 | Images of each section of the application |
Operations are explained | 5 | Detailed operation of each section of the application |
Written to the user’s level and is not technical | 5 | Must not contain code or any other technical items irrelevant to the users |
Subtotal | 20 |
Application Code (Due Week 7)
The following grading rubric will be used for the code portion of the project.
Flooring Application | Points | Description |
---|---|---|
Standard header included | 2 | Must contain program name student name and description of the program |
Program compiles | 2 | Program does not have any error |
Program executes | 2 | Program runs without any error |
Includes at least 3 tabs | 10 | Three or more tabs are used |
Includes components for all required inputs | 35 | Components for customer name address floor type length width area and cost with buttons to calculate area calculate cost display order summary and display order list are included |
Area calculation | 4 | Area is calculated correctly |
Cost calculation | 5 | Cost is calculated correctly |
Included data validation | 10 | If no values or non-numeric values are entered. the proper error message should display. |
Correct data is stored in the database table | 10 | When values are entered the data is stored correctly in the database table. |
Customer orders are displayed in a list | 10 | All records saved to the database are displayed in a list with appropriate formatting. |
Correct output is displayed | 10 | When values are entered the order summary is shown with appropriate formatting. |
Total | 100 |
OBJECTIVES
PROBLEM:Stocks4U Portfolio Management System
The portfolio management system you developed for Stocks4U needs the ability to save and restore a user’s data from a text file.
FUNCTIONAL REQUIREMENTS
You can code the GUI by hand or use NetBeans GUI Builder Interface.
You will enhance Week 4 GUI to include
Stock class
StockIO class
Create a StockIO class that is used to read from and write to a text file using an ArrayList. Make sure to use a delimiter between the fields; it does not have to be the # character.
Example format of the file is:
Apple#100#55.0#80.0
Intel#50#75.0#70.0
This class should have two methods.
The file name will be an instance variable that you can set with a parameterized constructor, or with a separate method.
GUI class
Note that you will need to add an ArrayList to your GUI class to manage the data to/from the file. It will act as a parallel array to your DefaultListModel. Anytime you add a stock, you must add it in BOTH places. Anytime you remove a stock, you must remove it in BOTH places.
File—open should prompt for filename using JOptionPane, read the file and populate the JList.
File—save should prompt for filename to save data from JList to.
File—exit should exit the program.
The total value of the portfolio should be displayed at all times and updated anytime a stock is added or removed.
CODE STYLE REQUIREMENTS
/****************************************************
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
Follow assignment specification regarding class/method names.
Note that your Java filename must match class name (DO NOT rename).
OBJECTIVES
PROBLEM: Student Management System
A teacher needs the ability to store and retrieve student data. This includes
FUNCTIONAL REQUIREMENTS
You can code the GUI by hand or use NetBeans GUI builder interface.
Create a GUI which allows for input and display of student data.
It should include buttons to save a record, display all records.
Create a database and table to store student name and three test scores. (Note that average and grade are calculated by app.)
Student class
Create a Student class to manage the student data. It should have private instance variables of
The class must have the following methods.
StudentDB class
Create a StudentDB class that is used to create a connection and interface with the database.
This class should have two methods.
GUI class
Insert button will take the info from the GUI (student name and three test scores) and insert a record into the table. Input should be cleared from the textboxes.
Display button will read the data from the database and creates a report in Console window, sample format below.
Name, | Test1, | Test2, | Test3, | Avg, | Grade |
---|---|---|---|---|---|
Bruce Wayne, | 90 , | 95 , | 98 , | 94.3 , | A |
Clark Kent, | 65 , | 70, | 90 , | 75.0 , | C |
CODE STYLE REQUIREMENTS
/****************************************************
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
Follow assignment specification regarding class/method names.
Note that your Java file name must match class name (DO NOT rename).