Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DrRacket - For this problem set, each participant has a name, a list of ;; topics that they are interested in or have expertise in,

DrRacket - For this problem set, each participant has a name, a list of ;; topics that they are interested in or have expertise in, and a list of ;; participants that they mentor. We'll assume that each person has at most ;; one mentor, even though this isn't true in real life.

(@htdd Participant ListOfParticipant ListOfString) (define-struct participant (name topics mentees)) ;; Participant is (make-participant String ListOfString ListOfParticipant) ;; interp. a participant with a name, list of topics they have interest or ;; expertise in, and a list of participants that they mentor

;; ListOfParticipant is one of: ;; - empty ;; - (cons Participant ListOfParticipant) ;; interp. a list of participants

;; ListOfString is one of: ;; - empty ;; - (cons String ListOfString) ;; interp. a list of strings

(define LOS0 empty) (define LOS1 (list "interviewing")) (define LOS2 (list "communication skills" "testing" "code reviews")) (define LOP0 empty) (define P0 (make-participant "Xavier Maxwell" (list "testing" "data science") empty)) (define P1 (make-participant "Sarah Jackson" (list "algorithms" "communication skills" "data mining") empty)) (define P2 (make-participant "Ling Xu" (list "writing" "machine learning" "programming") empty)) (define LOP1 (list P1 P2)) (define P3 (make-participant "Ananya Kumar" (list "programming" "writing" "testing" "cybersecurity") LOP1)) (define P4 (make-participant "Ella Mason" (list "data science" "writing" "data mining") (list P3))) (define P5 (make-participant "Ora Jacobson" (list "communication skills" "testing" "interviewing" "code reviews") empty)) (define P6 (make-participant "Sam Hu" (list "programming" "communication skills" "algorithms" "visualization") empty)) (define P7 (make-participant "Mandy Wilson" (list "game development" "programming" "graphical design") empty)) (define P8 (make-participant "James Ploshynsky" (list "machine learning" "AI") (list P5 P6 P7))) (define P9 (make-participant "Ayra Nguyen" (list "programming" "writing" "data science") (list P0 P4 P8)))

#; (define (fn-for-participant p) (... (participant-name p) (fn-for-los (participant-topics p)) (fn-for-lop (participant-mentees p))))

(define (fn-for-lop lop) (cond [(empty? lop) (...)] [else (... (fn-for-participant (first lop)) (fn-for-lop (rest lop)))]))

(define (fn-for-los los) (cond [(empty? los) (...)] [else (... (first los) (fn-for-los (rest los)))]))

(@problem 3) ;; Perhaps we want to know if a certain participant exists in ;; a participant's mentoring network. ;; ;; Design a function that consumes a participant and a name, in that order. ;; Search the given participant and all mentees eachable from the ;; participant for someone with the given name, and if found, produce ;; that participant. (@htdf find-participant--participant find-participant--lop)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions