Question: Using Haskell: Implement a data type called Student. The student type has four fields, first name, last name, major, and age. Implement a tree node

Using Haskell: Implement a data type called Student. The student type has four fields, first name, last name, major, and age. Implement a tree node type that has a student as one of its fields. The tree will be a binary search tree on the attribute age. Write a comma separated file in which each line (ended by new line character) contains a student, with its fields separated by commas Read the comma separated file (specified by a command line argument) and produce a list of students. Construct a binary search tree using the tree nodes you created, according to the ages of students. Write a function that will search through the tree to see if it contains a student of age x. It returns true if there is, otherwise it returns false. Write a function that takes a string for last name uses depth-first search to find if a student with that name is in the tree. How the program needs to work: When a user first calls it, she passes in the name of the csv file as an argument. Then, a user can call the program and pass in a function (either search-age or search-name) and a value (a number or a last name). The program prints True or False.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!