reset password
Author Message
omizi
Posts: 22
Posted 20:38 Oct 22, 2014 |

what syntax are we suppose to use in order to test our functions

disrael
Posts: 44
Posted 22:09 Oct 22, 2014 |

I have no idea how to test it even if I think my defs are correct. Someone please help.

303496263
Posts: 68
Posted 23:15 Oct 22, 2014 |

Which ones do you want to test?

Lets say for singletonSet: feed it an an integer. Then to see that it indeed made a set out of your int( a set containing just one element, the int you fed it), then use the contains() function in the following way. Contains(singletonSet(156), 1). This will return false because the intiger 1 is not in the set{156}. Makes sense?

303496263
Posts: 68
Posted 23:31 Oct 22, 2014 |

I will be available tomorrow between 11:30 and 1:20 when the class starts so if you wanna meet up at the library, I'd be more than happy to discuss these problems with you. Oh and I'm Sevak btw :)

omizi
Posts: 22
Posted 13:06 Oct 23, 2014 |

i know that one i jus wanted to see how he was going to test us on the other ones or is he jus going to look at the code

303496263
Posts: 68
Posted 14:20 Oct 23, 2014 |

For the rest, just feed them some sets and again use contains() to see if indeed they did their job(union, intersect and dif).

 

omizi
Posts: 22
Posted 15:11 Oct 23, 2014 |

thanks it worked but im having problem with map its not work with two sets or interger

303496263
Posts: 68
Posted 15:25 Oct 23, 2014 |

Tbh I've not done map yet as I'm working on my other classes hws.

Will post here when I do it.

omizi
Posts: 22
Posted 16:09 Oct 23, 2014 |

ok