Write java program that reads number of patient and then let the employee enter their names and ages and count them. the program should check if the age of the patient is below 25 years otherwise, the patient will not be counted. your program should display the total number of patients under the age of 25 as the picture i uploded .
also i use java on netbeans. i need the answer on a java file thank you.
Category: Java
Final bid is 10 dollars, please do not overbid. The final output has to look li
Final bid is 10 dollars, please do not overbid.
The final output has to look like the “p3 execution output txt file”
When was Java created? Java was created by Sun Microsystems in the US back in 19
When was Java created?
Java was created by Sun Microsystems in the US back in 1981.
Who was the lead developer of Java?
James Gosling was the lead developer of Java.
How many major releases has Java had?
Java has had three major releases.
Who developed Java?
Microsystems developed Java.
When was Java developed?
Java was developed in 1981.
What was the goal of developing Java?
The goal of developing Java was to create a simple, reliable language based on C++ but without troublesome features.
What was the focus of Java’s development?
The development of Java was focused on creating a good experience for developers.
What was the significance of Java in the World Wide Web?
Java was the first application language of the World Wide Web.
Please do the code in Java (not in JavaScript). Make sure to read the instructio
Please do the code in Java (not in JavaScript).
Make sure to read the instructions carefully.
Once you are done, I will submit it on Gradescope (which is a tool that my University uses to see if the code compiles), and I will let you know if it does or doesn’t compile 🙂
Please make sure to comment on all of your work for all of the methods and classes.
Instructions ITN 261: Gradebook – javaFX Problem statement: You are tasked with
Instructions
ITN 261: Gradebook – javaFX
Problem statement:
You are tasked with writing a program that will keep track of student grades and display them in a graphical program.
Requirements:
Student information should be stored within a Student class object
We must keep track of each students:
Name – String
GPA – double
Id – int
Standing – int
0 corresponds to freshman
1 corresponds to sophomore
2 corresponds to junior
3 corresponds to senior
Grading details:
Correct usage of OOP concepts (80%)
Correct class design and usage of class instances (30%)
Correct usage of javaFX objects and classes (30%)
Other supporting code/logic (20%)
Program runs/correct results (10%)
Formatting/Indentation (10%)
Starter Code:
import java.util.ArrayList;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
import javafx.stage.Stage;
public class Gradebook extends Application {
static ArrayList
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
// TODO: Make the necessary changes to display the class
// roster using a JavaFX window rather then the console.
roster.add(new Student(“John”, 3.5, 700000001, 0));
roster.add(new Student(“Jane”, 3.2, 700000011, 0));
roster.add(new Student(“Mike”, 3.9, 700000012, 1));
roster.add(new Student(“Mary”, 4.0, 700000013, 2));
roster.add(new Student(“Joseph”, 3.1, 700000002, 3));
for (Student each: roster) {
System.out.println(each);
}
}
}
Sample output: Gradebook name = John, gpa = 3.5, id = 700000001, class = Freshman name = Jane, gpa = 3.2, id = 700000011, class = Freshman name = Mike, gpa = 3.9, id = 700000012, class = Sophomore name = Mary, gpa = 4.0, id = 700000013, class = Junior name = Joseph, gpa = 3.1, id = 70000002, class = Senior
ChatGPT
To create a JavaFX program for your gradebook application, you need to make the necessary changes to the provided code. You will need to create a graphical user interface to display the class roster. I’ll guide you through the process step by step:
First, you need to create a Student class that stores student information. It appears you already have a Student class; ensure that it has the necessary fields and constructor. Here’s a simplified version of the Student class for reference:
javaCopy codepublic class Student {
private String name;
private double gpa;
private int id;
private int standing;
public Student(String name, double gpa, int id, int standing) {
this.name = name;
this.gpa = gpa;
this.id = id;
this.standing = standing;
}
// Implement getters and setters for the fields if necessary
// …
}
Save to grepper
Next, you need to update the start method of your Gradebook class to create a JavaFX window and display the class roster. You can use JavaFX components such as VBox and Text to accomplish this. Here’s a modified start method:
javaCopy code
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle(“Gradebook”); // Set the window title
VBox vbox = new VBox(); // Create a vertical box to hold the student information
for (Student student : roster) {
Text studentText = new Text(“name = ” + student.getName() +
“, gpa = ” + student.getGpa() +
“, id = ” + student.getId() +
“, class = ” + getStandingName(student.getStanding()));
vbox.getChildren().add(studentText); // Add each student’s information to the VBox
}
Scene scene = new Scene(vbox, 400, 300); // Create a scene with the VBox
primaryStage.setScene(scene);
primaryStage.show(); // Display the window
}
// Helper method to get standing name from the integer standing
private String getStandingName(int standing) {
switch (standing) {
case 0:
return “Freshman”;
case 1:
return “Sophomore”;
case 2:
return “Junior”;
case 3:
return “Senior”;
default:
return “Unknown”;
}
}
Save to grepper
Ensure you have the required JavaFX libraries and dependencies in your project setup.
Make sure to import the necessary JavaFX classes at the beginning of your Java file:
javaCopy code
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
Save to grepper
The provided sample output is no longer needed, as you will be displaying the student information in the JavaFX window.
To run the program, call launch(args) in the main method as you did before.
Your JavaFX application is now ready to display the class roster. When you run the program, it will open a window with the student information displayed vertically in a VBox. The student information will be formatted similar to the sample output, but it will be presented in a graphical user interface.
Kindly using ChatGPT is not allowed as our University’s website detects web simi
Kindly using ChatGPT is not allowed as our University’s website detects web similarities .DOCx file is attached .
I have attached the zip file to this question. All you have to do is just add a
I have attached the zip file to this question. All you have to do is just add a box to the HTML and the instructions are provided.
change the colors instead of this shitty blue to a miz of these HEX: #eaece5, HEX: #b2c2bf, and just add the box and that’s it.
Please do the coding in Java (not JavaScript). Add comments on your work. Please
Please do the coding in Java (not JavaScript).
Add comments on your work.
Please make sure to read the instructions carefully.
Please I need to get help with this by today please this needs to run in termina
Please I need to get help with this by today please this needs to run in terminal as well as proper Java doc added.
TSims1 4rYwr92! https://learn.zybooks.com/zybook/SalemUniversityIT…1. https:/
TSims1
4rYwr92!
https://learn.zybooks.com/zybook/SalemUniversityIT…1. https://learn.zybooks.com/zybook/SalemUniversityIT…
2. https://learn.zybooks.com/zybook/SalemUniversityIT…