SOLVED: Tutor Wages

30.99 $

As a competent programmer, your understanding of control structures, your ability to design and develop algorithms, and your proficient use of data structures will help you to design and develop applications to meet customer requirements. You will need to develop a Java application to meet the requirements of this assignment. This assignment requires a graphical user interface (GUI).

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: rar solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

5/5 - (1 vote)

As a competent programmer, your understanding of control structures, your ability to design and develop algorithms, and your proficient use of data structures will help you to design and develop applications to meet customer requirements. You will need to develop a Java application to meet the requirements of this assignment. This assignment requires a graphical user interface (GUI). Note: It is recommended that you use NetBeans to develop this application and the NetBeans GUI Builder to develop your GUI. To download this program, follow the instructions found at the web link below. You will use the following scenario to complete the task: A friend has requested that you develop an application that will help keep track of earnings from a tutoring business. A graphical user interface (GUI) is required to ensure the application is user friendly. The application will accept earnings information. The user will enter minutes and earnings per each tutoring session. Upon request, a report can be generated providing average earnings per session, total tutoring minutes provided, and total earnings to date. The application should be well commented to make it easy to maintain. Task: Note: You will submit all .java and .class files in one zipped folder. If you developed this application using NetBeans, it is recommended that you zip and submit the entire NetBeans project folder. A. Create a program that has a GUI and calculates earnings and tutoring time by doing the following: 1. Create a GUI that allows a user to enter the following into labeled textfields: • Number of minutes for tutoring session (should be a positive decimal number) • Earnings in dollars and cents received (should be positive decimal number) a. GUI should be built using javax.swing components jButton, jLabel, jTextField, jTextArea, jFrame, and jPanel. 2. Implement functionality for each of the following application buttons: • “Quit” button: Should exit application • “Enter” button: Accepts entered number of minutes and earnings; as earnings information is entered, it is stored in a two-dimensional array • “Run Report” button: Calculates total minutes of tutoring provided, average wages earned per hour, total earned to date, and determines if average wage per hour is below, average, or above minimum wage 3. Use a two-dimensional array to store the entered minutes tutored and earnings received information for each tutoring session, as illustrated in the attached Two-Dimensional Array 4. Implement the “Run Report” button to iterate through the two-dimensional array using a nested for-loop to display the earnings data to the jTextArea, as illustrated in the attached “Earnings Entered.” 5. Implement the “Run Report” button to calculate the following: • Total minutes tutoring provided (as a decimal number) • Average wage per hour (in dollars and cents) • Total earnings (in dollars and cents) • Wage analysis, determined based on comparison of average per hour earnings and current minimum wage, using the following logic: – if average wages per hour is < minimum wage, then below average - if average wages per hour is ≥ minimum wage AND ≤ minimum wage × 2.00, then average - if average wages per hour is minimum wage × 2.00, then above average 6. Display resulting calculations in GUI text area in the required format, as illustrated in the attached “Calculations Display. Use exceptions to handle invalid user entries for the following situations: • If minutes entered is less than or equal to zero, throw exception. • Tutors should not tutor for longer than 4 hours per day. If minutes entered is greater than 60 × 4 = 240 minutes, throw exception. • Tutors must be paid for their tutoring service. If earnings entered is not greater than or equal to zero, throw exception. Note: The program should not terminate abruptly if any of these situations are encountered. The application should print a message “Invalid input. Please try again.” and let the user continue using the application. 8. Use single-line and multiline comments to explain program flow. ******************************************************************************************************************************** package ket1task1; //Import Statements here import javax.swing.*; import java.awt.*; //import java.util.Scanner; import java.awt.event.*; import java.text.*; import java.text.Format.*; public class KET1Task1 { //declare variables used by other classes here static JTextField minutesInputArea; static JTextField dollarsInputArea; static JTextArea textOutput; static JScrollPane scrollPane; static JLabel errorLabel; static JLabel errorLabel2; static JLabel errorLabel3; static double minutes; static double dollars; static double[][] data = new double[10][2]; static int arrayRow = 0; static int arrayColumn = 0; static Exception timeToLowException; static Exception moneyException; static final double MINIMUM_WAGE = 7.75; //Build Frame with Default size public static void buildFrame() { int frameWidth = 600; int frameHeight = 400; //Frames JFrame myFrame = new JFrame(); //Panels JPanel mainPanel = new JPanel(); //Panel Containing all components JPanel buttonPanel = new JPanel(); //Used to Organize Buttons JPanel northPanel = new JPanel(); //Used to Center Title Label JPanel emptyPanel = new JPanel(); xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

  • TutorWages.rar