Java program to ask user to enter favorite color

Assignment Help JAVA Programming
Reference no: EM1348161

Q1) Write a Java program to ask the user to enter favorite color, a favorite food, favorite animal, and first name of a friend or relative. Program must then print the following two lines, with the user's input replacing the items in italics:

I had a dream that NAME  ate a COLOR  ANIMAL  and said it tasted like FOOD!

For example, if the user entered blue  for the color, hamburger  for the food, dog  for the animal, and Jake  for the person's name, the output would be:

I had a dream that Jake ate a blue dog and said it tasted like hamburger!
Don't forget to put the exclamation mark at the end.
Input Notes: Each response by the user is a full line of text (terminated by hitting enter on the console). The information is read in this order: name, color, food, animal.

Reference no: EM1348161

Questions Cloud

What strategies would you implement for pricing : Now you are losing a few of your clients to a local competitor who has undercut your pricing, resulting in more net losses in clients. What strategies would you implement for pricing your services?
Find out the masses of the fragments : A 3.00-m-long, 400 kg steel beam extends horizontally from the point where it has been bolted to  framework of a new building under construction. A 74 kg construction worker stands at the far end of the beam.What is the magnitude of the torque abo..
Evaluating the two companies financial statements : A corporation has recently met with auditors to discuss scope of year's audit. Talk about the reason for an integrated audit and give a recent failure of a corporate governance.
Define what needs to be done to manage risk on a project : Define what needs to be done to manage risk on a project. When must this be done? How can risk assessment matrix aid in this process?
Java program to ask user to enter favorite color : Write a Java program to ask the user to enter favorite color, a favorite food, favorite animal, and first name of a friend or relative.
How to calculate the angular momentum of the system : What mass (in grams) of steam at 100°C must be mixed with 377 g of ice at its melting point, in a thermally insulated container, to produce liquid water at 58.0°C? The specific heat of water is 4186 J/kg·K. The latent heat of fusion is 333 kJ/kg, ..
Production cost variances : When determining end of period production cost variances, which of the following product costs components will require flexing?
Preventing the importation of grey goods : Preventing the importation of grey goods legitimately manufactured outside the country is, in reality, injurious to consumers as well as contrary to basic principles of unfair competition laws What does that means and is it correct?
Computing-jouralizing standard cost variances : Actual production and sales were 62,900 coffee mugs, actual direct materials usage was 10,000 lbs. at an actual price of $0.17 per lb., actual direct labor usage was 202,000 minutes at a total cost of $30,300

Reviews

Write a Review

JAVA Programming Questions & Answers

  Evaluate the rtas resource requirements

Design and implement a set of classes and interfaces and use them to evaluate the RTA's resource requirements.

  The objective is to implement a menu-based system

The objective is to implement a menu-based system for Bank Accounts in order to simulate a very simple banking system. Many structures have to be declared to manage bank accounts.

  Implementation the two classes

Program Specifications: In the new implementation, the two classes, Student and Grades, are defined with the following operations/methods.

  Java project

Prompt the user for an int between lower and upper boundary.

  The frantic pipe layer game

Design the Frantic Pipe Layer game

  Design and implementation of a hangman game

Design and Implementation of a Hangman game

  Develop a reliable transfer protocol over udp

Develop a reliable transfer protocol over UDP. Focus on a Stop- and-Wait protocol.

  Solving programming problems

Write a computer program that will figure out the total of an order when given the amount of the order ($1000) and a sales tax rate of eight percent.

  Write a program to register students for a college

Students have names, addresses and courses. Implement the interface class RegisterStudent. RegisterStudent has one method, public boolean register, which returns the boolean value of true or false if the student is successfully registered for the ..

  Data structures and algorithms

Code analysis and programming.

  Creating the gui for the game interface

A GUI-based application that allows a user to play a simple trivia game

  Create your own date class

You are to write a program that determines the day of the week for New Year's Day in the year 3000. To do this, you must create your own date class (MyDate) and use the following interface and main program:

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