UML Diagram Link: http://i48.tinypic.com/swpavb.jpg
Above is a link to a pic of a UML diagram I got today in class and I am supposed to convert that UML diagram into code. My specific problem that im having trouble with is that I am having trouble with the checking class. I dont understand what its supposed to do. I just dont understand what chargepercheck,numCheckand minBalance are supposed to do Im just so lost... Any help would be apreciated. Thanks!
Copyright © 2024 QUIZLS.COM - All rights reserved.
Answers & Comments
Verified answer
Your Checking class needs to have 3 private member variables:
chargePerCheck - Type float
numCheck - Type int
minBalance - Type float.
The UML doesn't tell you how they should be initialized, or how they can be changed. Maybe that information is elsewhere in the assignment?
If not, given no other information, I would initialize all 3 to 0, since that seems like a reasonable default.
So, create private variables for the 3. Initialize them to 0 in your constructor. If there are no other instructions on how to use them, then you are done. (If there are more instructions, then you need to share them ;-)
#contain iostream #contain <conio.h> using namespace std; elect the flow fToC (elect the flow degrees); int significant() { elect the flow fahrenheit,centigrade; cout << "enter the fahrenheit temperature:" << endl; cin >> fahrenheit; centigrade = fToC(fahrenheit); cout << fahrenheit << "F is" << centigrade << " C"; getch(); go back 0; } elect the flow fToC (elect the flow degreesF) { elect the flow degreesC = ( (5.0/9.0) * (degreesF -32.0) ); go back degreesC; } you realize you'll in no way make it everywhere in instructions with the help of taking classes from people right here. Do you comprehend the formula in any respect? Like, if the Fahrenheit temperature is 50, then you subtract 32, seems to be 18, then multiply with the help of 0.555, then around the style.