Write the course name and the exam date along with your name, birthdate, and signature at the top of each of your answer sheets.
You may make use of the Lue or Read classes in your solutions.
(6 points)
(5 points)
First, the program asks for the rate and the name of the foreign currency, after which it can be used to calculate several conversions from FIM to the foreign currency. The program checks the validity of its numerical input and complains on errors. The program must generate clear and understandable output. Design the way the program ends.
(5 points)
Write the class AgriCola to implement the soda pop factory. The
implementation of the ingredient tanks is kept hidden from the
user of the AgriCola object; they can only be manipulated via
methods. The user of an AgriCola object can produce soda pop by
calling the method
double produceJuice(int howMuch).
Specify the structure of the factory precisely; its constructors and methods. Implement the AgriCola class.
Also write a main program to test your class.
(6 pistettä)