-
March 15th, 2011, 06:28 AM
#1
Please!!! Help me build this program
The question is
The mass of an empty gas jar, together with its glass cover plate, was 478.0g. When completely filled with water and cover plate fitted the mass was 1508.2g. An oven dried sample of soil was inserted in the dry gas jar and the total mass, including the cover plate, was 676.6g. Water was added to the soil and, after a suitable period of shaking, was topped up until the gas jar was brimful. The cover plate was fitted and the total mass was found to be 1632.6g. Determine the particle specific gravity of the soil. Given the formula to find the particle specific gravity (Gs) is as follow:
Gs = Mass of dry soil/Mass of same volume of water
Write a program to compute the value of Gs with soil type as input. Please write down your analysis and design in the sheet attached. State clearly the other formula that you may use to find the solution. In order for you to find the value of Gs you need to find the following values as according to the problem above:
a) Mass of soil + water(massSoilWater)
b) Mass of dry soil(massDrySoil)
c) Mass of water present with the soil(massOfWaterInSoil)
d) Mass of water when gas jar is full (massOfJarWater)
e) Mass of water of a same volume as soil(massWaterVolSoil)
The program must produce a correct soil name based on the Gs obtained above. Use the following table to decide the soil name:
Type of Soils Gs Name Of Soils
Very Coarse Soils >=600.00 Boulders
>=400.00 but <600.00 Cobbles
Coarse Soils >=500.00 Gravel
>=200.00 but <500.00 Sand
Fine Soils >=100.00 Silt
>0.00 but <100.00 Clay
p/s
please...help me....i'm still newbie to C++ programming....
-
March 15th, 2011, 06:33 AM
#2
Re: Please!!! Help me build this program
What have you done so far?
Break the problem down and tell us what part you are having trouble with.
Rich
Visual Studio 2010 Professional | Windows 7 (x64)
Ubuntu
-
March 15th, 2011, 10:48 AM
#3
Re: Please!!! Help me build this program
Code:
#include <iostream>
int main()
{
std::cout << "Start here!" << std::endl;
}
Viggy
-
March 15th, 2011, 04:45 PM
#4
Re: Please!!! Help me build this program
Originally Posted by MrViggy
Code:
#include <iostream>
int main()
{
std::cout << "Start here!" << std::endl;
}
Viggy
This. You'll find people are far more likely to help you if you specify where you are having troubles with.
-
March 16th, 2011, 02:25 AM
#5
Re: Please!!! Help me build this program
Originally Posted by Alterah
This. You'll find people are far more likely to help you if you specify where you are having troubles with.
Viggy is not the OP, he was just giving a starting point.
Is your question related to IO?
Read this C++ FAQ article at parashift by Marshall Cline. In particular points 1-6.
It will explain how to correctly deal with IO, how to validate input, and why you shouldn't count on "while(!in.eof())". And it always makes for excellent reading.
-
March 16th, 2011, 09:37 PM
#6
Re: Please!!! Help me build this program
Originally Posted by monarch_dodra
Viggy is not the OP, he was just giving a starting point.
I know. I was just pointing out that the type of help Viggy gave isn't really helpful in answering the problem; however, this is the nature of the help the OP will get unless he/she is more specific with the kind of help needed. Also, showing effort typically makes the responses more helpful.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|