This function writes a JSON file of boys randomly
(number)
number of objects to be created.
This function writes a JSON file of gifts randomly
(number)
number of objects to be created.
This function writes a JSON file of girls randomly
(number)
number of objects to be created.
This function that makes an array of boys.
array
:
array of boys
This function that makes an array of girls.
array
:
array of girls
Class representing a boy.
Class representing a girl.
This function that makes an array of gifts.
array
:
array of gifts
Class representing a gift.
Create a Gift.
(number)
The name or ID of gift.
(string)
The type of the gift.
(number)
The price of the gift.
(number)
The value of the gift.
(number)
The luxury rating of the gift.
(number)
The difficulty to obtain value of the gift.
(number)
The utility value of the gift.
(number)
The utility class of the gift.
This function that makes an array of couples according to the input of girls.
array
:
array of couples
Class representing a couple.
This function logs output of question 1.
This function logs output of question 2.
This function gifts gift from the generous boy.
(number)
position of the couple array.
This function gifts gift from the geek boy.
(number)
position of the couple array.
This function gifts gift from the miser boy.
(number)
position of the couple array.