Get an opportunity to deal with user input

Assignment Help Programming Languages
Reference no: EM131249260

Assignment

We will work again with information having to do with family structure. You will get an opportunity to deal with user input, error checking, control facts and (possibly) salience. [I had originally intended to have this assignment deal with finding childre n, sons, daughters, grandparents, grandmothers, grandfathers, grandchildren, grandsons, granddaughters, ancestors and descendents as well. It seemed a bit much once I got into it!] This time we will use the following deftemplate and deffacts:

(deftemplate family

(slot mother)

(slot father)

(multislot daughters)

(multislot sons))

(deffacts family-tree
(family (mother Viola) (father Holt)

(daughters Frances Mildred))
(family (mother Cora) (father Walter)

(daughters Jaunita Dorothy Peggy) (sons Norm Carson)) (family (mother Frances) (father Norm)

(daughters Susan) (sons Norman Steve)) (family (mother Susan) (father Charlie)

(daughters Melissa) (sons Chris)) (family (mother Linda) (father Steve)

(daughters Kristin) (sons Stephen Jonathan)) (family (mother Kristin) (father Ryan)
(sons RJ))

(family (mother Sandy) (father Stephen) (sons Austin Parker))

(family (mother Amy) (father Jonathan) (sons Grayson)))

For your convenience I have placed these two constructs in the file BetterFamily. CLP under the Course Materials on the course website.

Starting with the file BetterFamily.clp that I have given you, you should add the required rules so that your expert system will perform as demonstrated below. DO NOT change the 2 constructs in the original file. Here is a sample execution (Notice that it should be possible to ask for the same information more than once):

CLIPS> (load BetterFamily.CLP)

[ stuff that shows things being loaded ] CLIPS> (reset)
CLIPS> (run)

Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
6 is not a valid response, silly! Give me a 1 through 4. Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)? one
one is not a valid response, silly! Give me a 1 through 4. Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special someone? Frances Here are the parents of Frances:
Viola is Frances's mother. Holt is Frances's father.
Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special someone? Walter
I can find no information on Walter's parents. Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special someone? George
I know noth ing abou t George!
Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special someone? Frances Here are the parents of Frances:

Viola is Frances's mother. Holt is Frances's father.
Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special someone? Susan Frances is Susan's mother.
Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special someone? Viola
I can find no information on Viola's parents. Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special someone? Blondie I know nothing about Blondie!
Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special someone? Parker Stephen is Parker's father.
Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special someone? Cora
I can find no information on Cora's parents. Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.

4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special som eone? Go mer
I know nothing about Gomer!

Tell me what you're looking for:

1) The parents of someone.

2) The mother of someone.

3) The father of someone.

4) I'd like to quit!

What's your pleasure (1-4)?

Thanks for chatting with me! CLIPS>

Verified Expert

This assignment deals with the java programming. In this assignment, relation is to be determined based on the user input. Screenshot is also attached for the same.

Reference no: EM131249260

Questions Cloud

Obtain information about an applicant : The use of work references is increasingly viewed as unreliable. How can employers legally and ethically obtain information about an applicant's past performance? What measures can be taken to verify information contained in a job application or r..
Find the equations of motion of the collar : Repeat your integrations for at least two other values of τ between 1 and 3 N-m, and find the value of θ at which the collar leaves the rod in each instance. Explain your findings.
Explain the three inventory control models : Explain the three inventory control models and the driving factor in each model. Provide examples for each one using current companies.
How son jarocho reflects the cultural landscape of mexico : Summarize how son jarocho reflects the cultural landscape of Mexico as Madrid. -Essay should include concepts and terminology.
Get an opportunity to deal with user input : We will work again with information having to do with family structure. You will get an opportunity to deal with user input, error checking, control facts and (possibly) salience
How does knowledge of the foundations and history : How does knowledge of the foundations and history of nursing provide a context in which to understand current practice? Identify at least three trends in nursing practice from the "Nursing Timeline of Historical Events" media piece. How have these..
Create a flow chart : The first step in building a PERT/CPM network is to: (a.) Create a flow chart (b). Determine the critical path
How does it address the metaparadigm theories of nursing : Describe the definition of nursing as put forward by the American Nurses Association. How does it address the metaparadigm theories of nursing?
Healthcare teams and healthcare delivery : Why do you think the healthcare administrators are important in healthcare teams and healthcare delivery?

Reviews

inf1249260

11/4/2016 6:44:03 AM

here is the clp.file to start off the assignment 18489340_1BetterFamily1.CLP i need the solution in clips like how the assignment described. you need to put the rules in the betterfamily.clp

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd