Calculates the energy required, Civil Engineering

Assignment Help:

Write a program called, A1Q1, that reads a single letter.   It will then display the corresponding ASCII code of the letter and prints the next character and the character which is corresponding to the "ASCII code + 3".  Comment on the unusual behaviour if you enter 'z' or 'Z' or '9' or '@'.  Shorthand operators and increment/decrement operators should be used in your code.

2. Write a program called A1Q2, that calculates the energy needed to heat water from an initial temperature to a final temperature. Your program should prompt the user to enter the volume of water in gallons and the initial and final temperatures in Fahrenheit. The formula to compute the energy isenergy = mass * (temperatureFinal - temperatureInitial ) * 4184 where 'mass' is in Kg; temperatures are in degrees Celsius and  'energy' is in J.  You will need to convert the inputs to the proper units (1 gallon = 3.785 litres).  Use constants not numeric literals to define physical constants and conversion factors.  What happens if the user enters the values as octal or hexadecimal numbers?

Here is a sample run:

Enter the amount of water in gallons: 11.5 

Enter the initial temperature in F: 55.2 

Enter the final temperature in F: 78.5 

To heat the water of 43.5275 kg from 12.8889 C to 25.8333 C, the required energy is 2357.43 KJ.


Related Discussions:- Calculates the energy required

Define ways of providing the anti slip device - by stops, Define Ways of pr...

Define Ways of providing the anti slip device - By stops? In this method stopper plates or angles are welded to the underside of the girder and embedded in the bed block. It sh

What is oil interceptors, Q. What is Oil interceptors ? Oils and Grease...

Q. What is Oil interceptors ? Oils and Grease are usually found in stormwater runoff from catchments. They come from spillage and leakage of fuels, lubricants, Vehicle coolants

Failure analysis in designing of a structure, Modes of failure • For sa...

Modes of failure • For safe design, a knowledge of the possible modes of failure is also necessary, e.g. failure of the structure could occur due to - Tensile fracture due t

Differences between epoxy grout and cement grout, Differences between epoxy...

Differences between epoxy grout, cement grout and cement mortar? Epoxy grout comprises epoxy resin, epoxy hardener and aggregates/sand.As a matter of fact, there are various ty

Duration activity for cast-in-place foundation formwork, A concrete contrac...

A concrete contractor historical records show that the construction duration for a cast-in-place foundation formwork is 1,000-SF/crew-day. Determine the number of days a 200,000-SF

Method of section, III. Calculate the magnitude and sense of the member for...

III. Calculate the magnitude and sense of the member forces BC, BG and HG using the method of sections

Designing considerations for dowel bars, Question What are designing c...

Question What are designing considerations for dowel bars in joints of concrete carriageway? Answer Behaviour of dowel bars resembles that of piles in soils subject

Concrete surface finish - limitations of ultrasonic system, Define Concrete...

Define Concrete Surface Finish - Limitations of Ultrasonic System? The smoothness of the surface under test is important to ensure proper acoustical contact between the transdu

Determine the grade rod reading at station, A section view of a proposed ro...

A section view of a proposed roadway is shown in Figure 1 with an existing grade point elevation of 100-ft. The proposed roadbed finish grade elevation at station 50+00 is 95.00-ft

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd