Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Creale a complete C progrim that includes all necessary functions in eeder to determine the clectricity costs associatod with a certain apartment building in each

image text in transcribed
Creale a complete C progrim that includes all necessary functions in eeder to determine the clectricity costs associatod with a certain apartment building in each area. Each apartment's eloctricity sonsumption for the specified namber of days is listed in a file named ElectricConpumption. Es, and the number of days relafed to each consume is contained in the file Days.bxt contains 15, then 157 Kilowatts of energy were spent over a period of 15 days). The progran's goal is to find out how much energy each apartment will cost based co bew many kilowatts are used and how moch a kilowati conts. The program's second objoctive is to calculate each apartment s eloctricity consumption in XW ucing the average consumption of all units. The program should use different functions, wach as follows: Function dessgnod io determine each apartment's exact electricity costs before takes depending on the eost per kilowalf. Function created to determine the exact foes after axes by adling the tax valoe based on coecamption valoc to the amoust of obecamption foportod on ElestrisConsumption.txt. of days ated botal electric consumed fer all apartments. Function that indicates how the difference between exact and approsimate data should be usod io define the perecutage of error. represent the exact foes before tax foe each apartment based on the calculation of electric coesumption and of each KW and the price of KW for calcgory of ecnsumption. A spocific file ealied ExadFersathat must be creatod fo write the valus of exact foes after tax boe each apartment, the valae of each line in this file must specified for specific apartment based on the exact fees before tax plus the value of tax baned on the consumption value. A particular file called Agprovimaric Constag will be used to soore the values of approximate consursption based on the total days for each apartment (Each line in the fille will be specified foe a specific apartment). The approximation of consumption will be listed for each apartment based on the mamber of days ased to calculate fecs. The Valae of Percentage Error for each apartment will be written to a specific file called ErmerPers,int, the pereentage cree cam be calculated based on the squakion below. Fach line in this flle mast coesain the percentage of error for each apurment based on the difference between evact consumptice and approximate consumption. Imprtant Equations and constructions Fact Electrie fees- No.Kw * Price for Kw+Tm based on No.Kw. Frice for the cenuming between 0-50 Kw is 0.65 Vice per Kw aed the Tax is 1.8%. Frice for censuming between 50-200Kw is 6.7Nis per Kw aed the Tax is 14% Price for Cansemption between 200- 460KW is 8.8Nin per KW and Tax is 14.85 , Price for consuming more that 460 is a.9Xis and the Tax is 16.5% Amount of Flectric Consuned Per day = Total Number of clectric consemed/ Total number of days. Approximate Censumption = Number of days * Ameant of Electric Censumed per day: plasaed! writing aed rodieg every Sle is ervesery

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Managing Your Information How To Design And Create A Textual Database On Your Microcomputer

Authors: Tenopir, Carol, Lundeen, Gerald

1st Edition

1555700233, 9781555700232

More Books

Students also viewed these Databases questions

Question

How is the key consumer benefit employed in an IMC campaign?

Answered: 1 week ago

Question

The company has fair promotion/advancement policies.

Answered: 1 week ago