Write a constructor for money data structure, Programming Languages

Create a Money data structure that is made up of amount and currency. 

(a) Write a constructor for this data structure  

(b)  Create accessors for this data structure

(c) Write operations convert-money (takes a Money object and a currency symbol and returns the Money object of the requested currency), add-money and subtract-money (add and subtract Money objects possibly from different currencies and return a Money object with currency of the first Money object argument)

Posted Date: 3/22/2013 5:26:12 AM | Location : United States







Related Discussions:- Write a constructor for money data structure, Assignment Help, Ask Question on Write a constructor for money data structure, Get Answer, Expert's Help, Write a constructor for money data structure Discussions

Write discussion on Write a constructor for money data structure
Your posts are moderated
Related Questions
This is Python program I am stuck Modify the Russian peasant multiplication mod n function from class to perform "Russian peasant exponentiation" instead. You can assume that you

would you like to see some of my code. I am trying to do an add friend request. when I view my friends page I click on the add button. with ajax I want the script to send over the

For this assignment you will use the robot/maze simulation example introduced in mini-assignments 0625ma-0627ma to develop a maze-solving program. The program will read a file cont

Question: (a) (i) Describe what an XML Data Island is and outline the restrictions of using a Data Island. (ii) The following XML file book.xml is used to keep track of a l

This assignment is an individual programming assignment using Perl. It addresses objectives 3, 4, 5 and 8 as listed in the Subject Outline document. The assignment is based on them

Write a Fortran LOGICAL FUNCTION, called "is_prime", which determines if a given integer value is a prime number or not (A prime number is a natural number which has only two disti

1. Implement a program where an ellipse follows the perimeter of the window. 2. Implement a program that can draw graphs, possibly following your plan from last week. Have it gr

Write a program to compute: 1.)    Mixing ratio, W=.622[Vapor pressure/(pressure-vapor pressure)] 2.)    Virtual temperature, VT=T(1+0.61 mixing ratio) = T(1+.61W) 3.)

Hi I have an assignment for prolog languagle is it possible to get help

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4