Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Please define a class School with the follow attributes: enrollment / / the total number of students at the school area / / size of

Please define a class School with the follow attributes:
enrollment // the total number of students at the school
area // size of the school in acres
budget // the annual operation budget
address: // the physical address of the school
name: // the name of the school
Please look at the detailed requirements in the starter code below.
public class School {
// define the instance variables(attributes)
// define the constructor
// define getters
// define setters
I/ define equals () method, if it has the same physical address, it is the same schoolPlease define a class School with the follow attributes:
enrollment // the total number of students at the school
area // size of the school in acres
budget // the annual operation budget
address: // the physical address of the school
name: // the name of the school
Please look at the detailed requirements in the starter code below.
public class School {
// define the instance variables(attributes)
// define the constructor
// define getters
// define setters
I/ define equals () method, if it has the same physical address, it is the same school
/* define toString() method so it prints the information about a school
name has enrollment students and the campus is area. It is located at address
For example:
Fulton School of Science has 2300 students and the campus is 150 acres. It is located at 123 Main Street, Alpharetta GA.
define school 1 with the following information
enrollment: 5500//this is the total number of students
area: 100// this is the size of the school in acres
budget:13.2 million // this is the annual operation budget
address: 4500 Peachtree street, Atlanta GA // this is the physical address of the school
name: Atlanta School of Art and Design // the name of the school
**1
/* define toString() method so it prints the information about a school
name has enrollment students and the campus is area. It is located at address
For example:
Fulton School of Science has 2300 students and the campus is 150 acres. It is located at 123 Main Street, Alpharetta GA.
define school 1 with the following information
enrollment: 5500//this is the total number of students
area: 100// this is the size of the school in acres
budget:13.2 million // this is the annual operation budget
address: 4500 Peachtree street, Atlanta GA // this is the physical address of the school
name: Atlanta School of Art and Design // the name of the school
**
define school 2 with the following information
enrollment: 4500//this is the total number of students
area: 210// this is the size of the school in acres
budget: 10.4 million // this is the annual operation budget
address: 3500 Salmon Rd, Anchorage Alaska // this is the physical address of the school name: Alaska School of Science // the name of the school
*/
// print schooll
// print school2
// check the enrollment of school1 and school2and print a message : school name1 has 999(replace 999) more/or less students than school name 2(use if statement to check and display either more or less)
I/ increate the enrollment of school 1 for 500 more students and decrease the enrollment of school 2 by 600. Now, print the message: In 2023, school namel has y(replace y with a number) more(or less) students than school name2.(use if statement)
}??? end of main
define school 2 with the following information
enrollment: 4500//this is the total number of students
area: 210// this is the size of the school in acres
budget: 10.4 million // this is the annual operation budget
address: 3500 Salmon Rd, Anchorage Alaska // this is the physical address of the school name: Alaska School of Science // the name of the school
*/
// print schooll
// print school2
// check the enrollment of school1 and school2and print a message : school name1 has 999(replace 999) more/or less students than school name 2(use if statement to check and display either more or less)
I/ increate the enrollment of school 1 for 500 more students and decrease the enrollment of school 2 by 600. Now, print the message: In 2023, school namel has y(replace y with a number) more(or less) students than school name2.(use if statement)
}??? end of main
PLEASE SOLVE IN JAVA IN 30 MINUTES
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

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

Step: 2

blur-text-image

Step: 3

blur-text-image

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