Marilyn Monroe has assured us that diamonds are a girl's best friend. The size of a diamond is measured in carats, but the value is measured in dollars! Every girl has a name. At first a girl does not have a diamond, but as time goes by the girl is given diamonds. A girl can have only one diamond, so if she has one and is offered a more valuable (in dollars) one, she will discard the old one and accept the new one.

Do an object oriented analysis and design for the above information, write the necessary classes, and write a driver program that:

Here's what a sample run should look like (with the keyboard input shown in italics) ...
Enter the name of the girl : Marilyn
Marilyn has no best friend
Enter carats and value     : 20 400
Woohoo, the girl took the diamond
Marilyn has a diamond, 20 carats, worth $400.0
Enter carats and value     : 40 700
Woohoo, the girl took the diamond
Marilyn has a diamond, 40 carats, worth $700.0
Enter carats and value     : 35 600
Aaargh, the diamond was rejected 
Marilyn has a diamond, 40 carats, worth $700.0
Enter carats and value     : 100 1000
Woohoo, the girl took the diamond
Marilyn has a diamond, 100 carats, worth $1000.0
Enter carats and value     : 20 400
Aaargh, the diamond was rejected 
Marilyn has a diamond, 100 carats, worth $1000.0
Enter carats and value     : 0 0
Marilyn has a diamond, 100 carats, worth $1000.0

You must ...

Answer