Question: Write a program (in Java) that will calculate the grams of a molecule according to given moles. Create three classes that will successfully run. User
Write a program (in Java) that will calculate the grams of a molecule according to given moles. Create three classes that will successfully run. User will need to input an element or a molecular compound and program will output the number of weight of the entered input to grams per mole. For example, when a user enters H (hydrogen), program should print out 1.0079 in grams per mole. If user enters more than one element, program should be able to calculate the formula for their molecular weight. For example, H2O (dihydrogen monoxide) should be calculated together to total to 18.01528 g/mol.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
