Write a program that simulates an interaction

Assignment Help Programming Languages
Reference no: EM132245479

Programming for Non-majors - Programming Project: Aloha, Stitch

This project will give you experience writing a program that involves branching (if).

PROJECT DESCRIPTION - "Aloha Stitch" is a toy that has a "conversation" with a user. Specifically, if the user "says" (inputs) one of several predefined phrases, then Stitch will respond with one of several predefined replies. Stitch has two moods: loving and rotten. Which mood Stitch is in depends on the most recent use of either of these two phrases: "I love you" or "You're rotten." If, most recently, Stitch has been told "I love you," then he will be in his loving mood; if, most recently, he has been told "You're rotten," then he will be in his rotten mood. That is, Stitch remembers which mood he's in. For some of the predefined phrases that a user can say, Stitch's response depends on whether his mood is loving or rotten; for others, he has the same response regardless of his mood.

Write a program that simulates an interaction between a user and Stitch. The program will explain how to interact with Stitch, then the user will input a phrase (explained below), and then Stitch will reply. Also, Stitch will remember his mood from run to run, and you will run the program many times, in order to show what Stitch is capable of.

BASIC STRUCTURE OF THE PROGRAM - The program body MUST be broken into two subsections: an input subsection and an output subsection, each of which is described in detail below. NOTE: There WON'T be a greeting subsection NOR a calculation subsection.

1. Input Subsection:

(a) Input the mood value from a file.

(b) Idiotproof the mood value.

(c) Input a code indicating which of the predefined phrases the user is "saying," or the help code.

(d) Idiotproof the user's chosen phrase code.

2. Output Subsection:

(a) Output Stitch's response, according to:

i. the predefined phrase that the user "says;"

ii. if necessary, Stitch's current mood;

iii. if requested, the menu of input phrase choices (rather than a response to a user phrase).

(b) Output the mood value to a file.

NOTE: You DON'T need to know how to input from and output to a file to complete this project, because helper code is provided.

Attachment:- Assignment File.rar

Reference no: EM132245479

Questions Cloud

What is the value of performing breakeven analysis : BSBFIM601 Manage Finance Assignment - What is the value of performing breakeven analysis? Why may an organization be required for and remit fringe benefits tax
Explain in one paragraph what is the purpose of conservatism : BSBFIM601 Manage Finances Assignment, Crown Institute Australia. Explain in one paragraph what is the purpose of conservatism
What is materiality and why is it important to auditors : What is the role of internal control and how does internal control affect the extent of audit procedure? What is materiality and why is it important to auditors
How has the company managed workforce diversity : Chosen to write about is Amazon. Only need 150 words for the literature review. How has the company managed workforce diversity
Write a program that simulates an interaction : CS 1313 010: Programming for Non-majors - Programming Project: Aloha, Stitch, University of Oklahoma, USA. Write a program that simulates an interaction
List and describe each character : Describe in detail what you see (background, props, scenery, etc.) List and describe each character (describe their clothing, accessories, etc.)
Who in the business entity would typically approve : Who in the business entity would typically approve and sign a contract? Explain the pros and cons of each entity in this context.
Prepare a memo that analyzes potential compliance issues : MBA 610,southern new hamipshaire university : What are the ethical implications involved in this business decision?
What might be the benefits of using machine learning : What might be the benefits of using machine learning (classification or regression)? What are the possible input data? How can the data be collected

Reviews

len2245479

2/28/2019 4:09:40 AM

This fourth project will give you experience writing a program that involves branching (if). This project will use the same development process as in Programming Projects #2 & #3, and will be subject to the same rules and grading criteria, with some new criteria added. This specification is less detailed than for previous programming projects. YOU ARE EXPECTED TO KNOW HOW TO PERFORM BASIC TASKS WITHOUT HAVING TO BE TOLD EXPLICITLY. NOTE: You MUST use aloha stitch.c as the name of your source file. The program body MUST be broken into two subsections: an input subsection and an output subsection, each of which is described in detail below. NOTE: There WON’T be a greeting subsection NOR a calculation subsection.

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