Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN JAVA LANGUAGE Question 1: o Implement a Menu Driven Java Program which can manage monthly maintenance charges of a residential housing scheme. The residential

IN JAVA LANGUAGE

image text in transcribed

Question 1: o Implement a Menu Driven Java Program which can manage monthly maintenance charges of a residential housing scheme. The residential area has following credentials: There are two styles of homes in residential area: Houses There are total 10 houses Maintenance charges of each house is Rs 1500/month O Apartment Buildings (5 floor apartment-means 5 homes in each apart) There are total 6 apartment buildings 3 buildings have lifts (elevators) 3 buildings are without lifts (elevators) Maintenance charges of apartments with lifts is Rs 3000/month Maintenance charges of apartments without lifts is Rs 2000/month O Your program should register a resident (as residential area admin) by entering its data: HouseNum, ResidentName, Payment Month, PaidStatus and House Type, o Method name: void input() overridden O Program should be able to take input of MaintenenceBills separately according to the House Type entered by the user. For that call input() methods of child classes All of the above Data should be written in a .txt file. Method name: void Save Information (Building b) it will save all the recordiny building in a file Your Program should be able to search billing information of any Resident by entering its House Number (from .txt file) Method name: void search Information(int HouseNumber) + user should enter House Number to search all the details of a resident. o O 0 Your program should be able to calculate the total maintenance bill of any specific month for all houses and all apartments separately and print on console. o double calculateTotalBill(int numberofBuildings, int month) this method should calculate total bill of that month of all the Buildings by taking input of: number of buildings billing month o For reference see the UML class diagram below: . Visual Paradigm Online Diagrams Express Edit Building -HouseNum: String +Res_name : String -isPaid: boolean +billing Month: int +House Type: String +setNum(n: String) +getNum(): String +setbill(n: double) +getbillo): double +setPaid (flag: boolean) +getPald(); boolean +inputo +calculate TotalBillallBuidlings: int, month:int): double #saveinformation +searchinformation(HouseNumberint) house -House MaintenenceBill: double setBill(n: double) +getBill): double +inputo + calculate TotalBill(allHouse:int, month:int)): double +SaveInformation +searchinformation(HouseNumberint) Apartment -ApartmentMaintenence Bill: double setBillin: double) +getBill): double +input() +calculate TotalBillallApartments:int, month:int): double +saveinformation + searchinformation(HouseNumberint) Lift -Lift_Charges: int hasLift():boolean

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