Question
I need help with Haskell. Please do the follow in HASKELL. This is HASKELL program, so please help me with the HASKELL language. Please show
I need help with Haskell. Please do the follow in HASKELL. This is HASKELL program, so please help me with the HASKELL language.
Please show code
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started