Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

From the previous question, you were supposed to make buttons to click in javafx for the project. I don't know why you can't understand that.

From the previous question, you were supposed to make buttons to click in javafx for the project. I don't know why you can't understand that.

ITEC 235 - Object Oriented Programming I Final Project -25% This project continues from Assignment 1. You will implement a GUI, Exception class and use files to store the objects. You are required to create a Medical Office Management application (MOM) which - using inheritance - will create and manipulate both employee and patient objects. When your program is run it must display a main menu of options to the user as described below: N -New -For this option the program must immediately prompt the user to enter e or p to indicate whether they want to create a new patient or employee record. If the user selects e they must then be prompted for the persons first name, last name, date of birth, employee number, phone number and annual salary. If they select p then they must be prompted for the patients first name, last name, date of birth and phone contact, patient number. This information is then used to create the appropriate object which is stored in an file that stores objects. If the user enters a command other than e or p, the program must display an appropriate error message and continue to prompt for valid data. S Select a patient account The program must prompt for a patients number and retrieve this object from the array. The user must then be prompted for transactions to be performed on the account as follows: Q query The program must print the patients id number full name, date of birth and balance. B bill The program must request a transaction amount and add this value to the patients current balance. P payment The program must request a transaction amount and subtract this value from the patients current balance. Exception class that ensures a minimum of 10% of the balance is paid X exit The program must return to the main menu. P payments The program must pay salaries to all employees and auto-deduct 10% of the outstanding balance on all patients account. X exit The program must display an appropriate parting message and quit when the application. The Person class must use the following class variables: i. count initialized to 0 which stores how many person objects have been created. ii. company initialized to a company of your choice. The Date class: as described in the class diagram. Override your toString to print the date as month/day/year e.g. 10/20/2020 Date -month:int -day: int -year:int + Date (month: int, day:int, year:int) +getDay() : int +getMonth() : int +getYear() : int +setDay(day:int) : void +setMonth(month:int) :void +setYear(year:int): void Employee and Patient that extends a Persons class. The Employee class i. A class variable which stores the number of employees noEmp ii. Instance variables: empID, first name, last name, date of birth (Date), phone number and annual salary(double). The Patient class i. A class variable which stores the number of patients noPat ii. Instance variables patID, first name, last name, phone number, date of birth (Date) and balance, which is used to keep track of any outstanding monies due by the patient. Marking Scheme Requirements Maximum Marks GUI look and feel 18 marks File Storage 10 marks Switching between Menu Items 10 marks Menu Item : New 10 marks Menu Item : Select 16 marks Menu Item : Payments 10 marks Menu Item : Displaying output 5 marks Search Method 5 marks Exception Classes 10 marks Documentation 2 marks Overall accuracy of program 4 marks 100

for example :

package javafxapplication2;

import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.layout.StackPane; import javafx.stage.Stage;

/** * * @author allis */ public class JavaFXApplication2 extends Application { @Override public void start(Stage primaryStage) { Button btn = new Button(); btn.setText("Say 'Hello World'"); btn.setOnAction(new EventHandler() { @Override public void handle(ActionEvent event) { System.out.println("Hello World!"); } }); StackPane root = new StackPane(); root.getChildren().add(btn); Scene scene = new Scene(root, 300, 250); primaryStage.setTitle("Hello World!"); primaryStage.setScene(scene); primaryStage.show(); }

/** * @param args the command line arguments */ public static void main(String[] args) { launch(args); Button btn1 = new Button(); Button btn2 = new Button(); btn1.setText("Say Hello World"); btn2.setText("222"); } }

* that will print a "hello World" button

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What is meant by formal organisation ?

Answered: 1 week ago

Question

What is meant by staff authority ?

Answered: 1 week ago

Question

Discuss the various types of policies ?

Answered: 1 week ago

Question

Briefly explain the various types of leadership ?

Answered: 1 week ago

Question

Explain the need for and importance of co-ordination?

Answered: 1 week ago