boys_generator

This function writes a JSON file of boys randomly

boys_generator(n: number)
Parameters
n (number) number of objects to be created.

gifts_generator

This function writes a JSON file of gifts randomly

gifts_generator(n: number)
Parameters
n (number) number of objects to be created.

girls_generator

This function writes a JSON file of girls randomly

girls_generator(n: number)
Parameters
n (number) number of objects to be created.

boy_driver

This function that makes an array of boys.

boy_driver(): array
Returns
array: array of boys

girl_driver

This function that makes an array of girls.

girl_driver(): array
Returns
array: array of girls

Boy

Class representing a boy.

new Boy()
Instance Members
constructor(name, intelligence, attractiveness, budget, minattractiveness, type)

Girl

Class representing a girl.

new Girl()
Instance Members
constructor(name, intelligence, attractiveness, budget, type, typePrefered)

gifts_driver

This function that makes an array of gifts.

gifts_driver(): array
Returns
array: array of gifts

Gift

Class representing a gift.

new Gift()
Instance Members
constructor(id, type, price, value, lux_rating, obtain_diff, util_value, util_class)

couple_driver

This function that makes an array of couples according to the input of girls.

couple_driver(): array
Returns
array: array of couples

Couple

Class representing a couple.

new Couple()
Instance Members
constructor(id, girl, boy)

couples

This function logs output of question 1.

couples

couples

This function logs output of question 2.

couples

gifts_from_generous

This function gifts gift from the generous boy.

gifts_from_generous(pos: number)
Parameters
pos (number) position of the couple array.

gifts_from_geek

This function gifts gift from the geek boy.

gifts_from_geek(pos: number)
Parameters
pos (number) position of the couple array.

gifts_from_miser

This function gifts gift from the miser boy.

gifts_from_miser(pos: number)
Parameters
pos (number) position of the couple array.