Create accessors for this data structure, Data Structure & Algorithms

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/28/2013 3:43:38 AM | Location : United States

Related Discussions:- Create accessors for this data structure, Assignment Help, Ask Question on Create accessors for this data structure, Get Answer, Expert's Help, Create accessors for this data structure Discussions

Write discussion on Create accessors for this data structure
Your posts are moderated
Related Questions

What is binary search?   Binary search is most useful when list is sorted. In binary search, element present in middle of the list is determined. If key (the number to search)

This is a unit of which targeted on the emerging data structures. Red- Black trees, Splay trees, AA-trees & Treaps are introduced. The learner must explore the possibilities of app

pseudo code for fibonnaci series

An AVL tree is a binary search tree that has the given properties: The sub-tree of each of the node differs in height through at most one. Each sub tree will be an AVL tre

Q. Draw a B-tree of order 3 for the sequence of keys written below: 2, 4, 9, 8, 7, 6, 3, 1, 5, 10

Q. Explain that how do we implement two stacks in one array A[1..n] in such a way that neither the stack overflows unless the total number of elements in both stacks together is n.

Q. How can we free the memory by using Boundary tag method in the context of Dynamic memory management?

Q. Construct a complete binary tree with depth 3 for this tree which is maintained in the memory using the linked representation. Make the adjacency list and adjacency matrix for t

1)    The set of the algorithms whose order is O (1) would run in the identical time.  True/False 2)    Determine the complexity of the following program into big O notation: