Find Jobs
Hire Freelancers

Water Management

₹600-1500 INR

已关闭
已发布超过 2 年前

₹600-1500 INR

货到付款
All Geektrust challenges are meant to be solved offline. Once you have completed the challenge, you can test and submit your code here. Your score will be determined based on factors such as OOPS, readability, and scalability. You should read what we look for in your solution before you start coding. It is NOT about just getting the right output. Please go through the build instructions here The challenge You work at WaterBill, a startup developing smart solutions for water management. GeekHeights community has approached you to use your software to manage their water bills efficiently. Each GeekHeights apartment is allotted with corporation and borewell water in a specific ratio at the start of the month. There are 2 bedroom and 3 bedroom apartments in the community and it is assumed that they will hold 3 and 5 people respectively. Each person is allotted 10L of water per day. So a 2 BHK apartment will be allotted 900 L (3*10*30) of water per month and a 3 BHK apartment will be allotted 1500L (5*10*30) of water per month. The total water consumption is then split between corporation and borewell based on a ratio. If there are additional guests in the apartment, the total allotted water will not suffice and the apartment has to ask for tanker water. Costs 1. Corporation Water - Flat rate of Rs. 1 per litre 2. Borewell Water - Flat rate of Rs. 1.5 per litre 3. Tanker Water - Slab rate:   • 0 to 500L - Rs. 2 per litre   • 501L to 1500L - Rs. 3 per litre   • 1501 to 3000L - Rs. 5 per litre   • 3001L+ - Rs. 8 per litre Tanker water has a slab rate similar to income tax slabs, which means you pay different amounts for each slab. For e.g if you have consumed 2000L of tanker water then your cost is 500*2 + 1000*3 + 500*5 = Rs. 6500 Your task Find out the total cost of water for a month for an apartment. Input Commands ALLOT_WATER <apartment-type> <ratio> Allots the water from corporation and borewell based on the apartment type and ratio passed. Here the ratio is always of the format Corporation Water : Borewell Water. This command will be executed only once a month per house and also at the start of the input command set. Example- ALLOT_WATER 3 1:5 ADD_GUESTS <no_of_guests> Adds the number of guests to a house. ADD_GUESTS command can be given multiple times in a month and total guests is the sum of all ADD_GUESTS numbers for that month. Example - ADD_GUESTS 10 BILL Prints the total water consumed in litres and the total cost, after cumulatively adding up all the guests cost to the bill. This command will be executed only once and at the end of the input set. It should print the total water consumption and the cost in the format <TOTAL_WATER_CONSUMED_IN_LITERS> <TOTAL_COST> Example - BILL 4500 13625 Assumptions 1. All the calculations are done for a single apartment in a month. Number of days in the month is assumed to be 30. 2. The water consumption is measured in litres. 3. All calculations should be rounded off to the nearest integer. No decimal values are used. 4. Allotment based on ratio is done only once at the start of the month. 5. Guests can be added a multiple number of times. 6. The command BILL can be executed only once, which is at the end of the month. It should be a part of the input set. SAMPLE INPUT-OUTPUT 1 INPUT: ALLOT_WATER 2 3:7 ADD_GUESTS 2 ADD_GUESTS 3 BILL OUTPUT: 2400 5215 SAMPLE INPUT-OUTPUT 2 INPUT: ALLOT_WATER 3 2:1 ADD_GUESTS 4 ADD_GUESTS 1 BILL OUTPUT: 3000 5750 SAMPLE INPUT-OUTPUT 3 INPUT: ALLOT_WATER 2 1:2 BILL OUTPUT: 900 1200
项目 ID: 32286225

关于此项目

3提案
远程项目
活跃2 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
3威客以平均价₹1,283 INR来参与此工作竞价
用户头像
I am the exact one who can fulfill your task without fail. I have 10 years of experience in developing We are team of 40+ Professionals who can help you for any software ,website , mobile apps and SEO/Google Ads/Facebook Ads Lead Generation, WhtsApp Marketing Panel , Crypto Projects We are offering free live demo if you are interested ping me back .
₹1,050 INR 在7天之内
0.0 (0条评论)
0.0
0.0
用户头像
I have made many projects like this and have excellent knowledge of Java, Data Structures and OOPS concepts. This will be a cakewalk to do.
₹800 INR 在2天之内
0.0 (0条评论)
0.0
0.0

关于客户

INDIA的国旗
Kolkata, India
0.0
0
会员自12月 6, 2021起

客户认证

这个客户的其他工作

MiniProject
₹600-1500 INR
谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。