Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I'm mostly looking for help on the menu driven program. I'm not expecting you to output since adding the .txt file is next to impossible
I'm mostly looking for help on the menu driven program. I'm not expecting you to output since adding the .txt file is next to impossible to add with no upload feature, I would mostly like to see how you would write it using Java.
The data file "Tenant_Data.txt" contains the data for 27 selected tenants in a shopping mall. Write a program as follows: 1. (Tenant.java) Write class Tenant definition: - Four private instance variables that respectively represent the tenant name, category, leasing term in years, and the square feet. - Two overloaded constructors - Getters and setters A method that calculates and returns the price per square feet. If the leasing term is between 0 and 3 (including 3), the price per square feet is $20.5; . If the leasing term is between 3 and 5 (including 5), the price per square feet is $18.5; . If the leasing term is 6 or above (including 6), the price per square feet is $15.0. . (Use constants) - A method that calculates and returns the annual rent (square feet * price per square feet) - A method that calculates and returns the monthly rent (annual rent/12) - toString) method 2. Write a menu-driven client program. The program should repeatedly execute until the user choose not to. Use an array of objects of the class Tenant to store the data for each tenant. It is required to use an array (not ArrayList) to store the tenant data. Use a JFileChooser object to locate the data file "Tenant_Data.txt" and read data to populate the array (the data file is on D2L). Use a menu to do the following: 1 --- Output the tenants' information 2 --- Output the average annual rent 3 --- Find the tenant with the highest monthly rent 4 --- Search a tenant by its name 5 --- Output tenants in each category including the count 0 --- Exit Real Estate Program Sample Run COMP2247 Assignment 1 Real Estate Program 1 --- Output the tenants' information 2 --- Output the average annual rent 3 --- output the tenet with the highest monthly rent 4 --- Search a tenant and print it's info. 5 --- Output tenants in each category 0 --- Exit Enter a command: 1 Tenant Name Category Term(Years) Sg Eest _Rer. Sou Feet Annual Rent Monthly Rent Steak House Pizza Place clothes Wendy Jonny's Moore Gala's Wa Jewelry Delight MR.Stathing The Lounge Sunshine HK Sale Jewelrxes Mers D.Shop Tace..Rlase Sandwich Sher Senior clothes Joe's Men's Clothing Yin MM Jewelry Lights Seat And Maxe Lakes Glasses Rice Blase Watch More Food Food Clothing Specialty Clothing Clothing Jewelry Specialty Clothing Specialty Specialty Food Jewelry Specialty Food Food Clothing Specialty Clothing Clothing Jewelry Specialty Clothing Specialty Specialty Food Jewelry Nin w win in oon in win in ni Ni w in 1650.00 1800.00 3500.00 900.00 1200.00 2000.00 1500.00 2000.00 2500.00 900.00 3000.00 3000.00 1500.00 1000.00 1700.00 1300.00 2900.00 1155.00 1790.00 2050.00 1500.00 2000.00 2500.00 900.00 3000.00 3000.00 1500.00 $18.50 $20.50 $18.50 $20.50 $18.50 $18.50 $18.50 $18.50 $20.50 $18.50 $18.50 $15.00 $18.50 $18.50 $20.50 $20.50 $18.50 $20.50 $18.50 $18.50 $18.50 $18.50 $20.50 $18.50 $18.50 $15.00 $18.50 $30525.00 $36900.00 $64750.00 $18450.00 $22200.00 $37000.00 $27750.00 $37000.00 $51250.00 $16650.00 $55500.00 $45000.00 $27750.00 $18500.00 $34850.00 $26650.00 $53650.00 $23677.50 $33115.00 $37925.00 $27750.00 $37000.00 $51250.00 $16650.00 $55500.00 $45000.00 $27750.00 $2543.75 $3075.00 $5395.83 $1537.50 $1850.00 $3083.33 $2312.50 $3083.33 $4270.83 $1387.50 $ 4625.00 $3750.00 $2312.50 $1541.67 $2904.17 $2220.83 $4470.83 $1973.13 $2759.58 $3160.42 $2312.50 $3083.33 $4270.83 $1387.50 $4625.00 $3750.00 $2312.50 on in win in in 1 --- Output the tenants' information 2 --- Output the average annual rent 3 --- output the tenet with the highest monthly rent 4 --- Search a tenant and print it's info. 5 --- Output tenants in each category 0 --- ExitStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started