Question: I need help with Haskell. Please do the follow in HASKELL. This is HASKELL program, so please help me with the HASKELL language. 1. Implement

I need help with Haskell. Please do the follow in HASKELL. This is HASKELL program, so please help me with the HASKELL language.

1. Implement a data type called Student. The student type has four fields, first name, last name, major, and age.

2. 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.

3. Write a comma separated file in which each line (ended by new line character) contains a student, with its fields separated by commas

4. Write a program that will:

a. Read the comma separated file (specified by a command line argument) and produce a list of students.

b. Construct a binary search tree using the tree nodes you created, according to the ages of students.

c. 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.

d. 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.

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!