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 program to take as input salesperson-s expected sales

Write program to take as input the salesperson's expected weekly sales and outputs the wages paid under each plan as well as announcing the best-paying plan.

  What are tools and strategies to increase traffic website

Select a web site from an education industry (university, school or training center) and analyze the ease of use of at least 3 functions and/or features?

  Write a program to enter the number of apartment units

Write a program that prompts the user to enter the number of apartment units, the rent to occupy all the units, the increase in rent that result in a vacant unit.

  Perl program that finds all the orfs in a genomic sequence

Given the genomic sequences for an organism; one of the first steps in identifying the genes is to identify the open reading frames - write a Perl program that finds all the ORFs in a genomic sequence.

  Program which accepts candy name-price per pound

A program which accepts the candy name (for example, "chocolate-covered cherries"), price per pound, and number of pounds sol in average month, and displays item's data only if it is best-selling item.

  Identify two major segments erp systems

And a brief summary describing how such a system would be installed/implemented

  Describe object-oriented databases.

Describe the database planning and development process. What steps are involved, and what tools may be appropriate or helpful?

  An sql query that will display all of the database fields.

An SQL database containing the fields in the current Chart of Accounts, plus a "balance" field.

  Write a function that returns the nth fibonacci value

Write the function delete_first(a, obj) that deletes from a only its first item that is equal to obj, if any. The function returns the modified array.

  Find out a web site which describes the use of a selection

find a web site that explains the use of a selection structure or an iteration structure in programming. provide the

  Write the required lines of code

Write the required lines of code that will create a ServerSocket object with a port number 3421 on which the server program is going to listen for client communications. Write the required lines of code that will create a new socket object

  Define class that contains member variable of type string

Define a class named Document that contains a member variable of type String named text that stores any textual content for the document.

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