Question about Homework

Open Question

Guessing a number

/* Project */
import java.io.*;
import java.util.*;
import java.lang.*;

public class Project{// start of class
public static void main (String [] args)throws Exception {//start of main method


BufferedReader input = new BufferedReader (new InputStreamReader(System.in));
//Declaration part
int choice,done=0;
//end of declaration
do{
//Welcome start
System.out.print("*************************************\n");
System.out.print("* Welcome *\n");
System.out.print("* to *\n");
System.out.print("* Bull's Eye!! *\n");
System.out.print("*************************************\n\n\n");
//Choice selection area
System.out.print("Let's start the Game\n");
System.out.print("[1] Start the Game\n");
System.out.print("[2] About the Author\n");
System.out.print("[3] Exit\n");
System.out.print("Please enter your choice : ");
choice = Integer.parseInt(input.readLine());
// switch case
switch (choice)
{//start of switch
case 1:
Start();
break;

case 2:
Author();
break;
case 3:
System.exit(0);
break;
default:
System.out.print("Invalid Input");
}//end of switch
} while (done != 3);
}//end of main method
public static void Start()throws Exception{//start of function public start
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
//Declaration part
int num[],result=0,result1=0;
int ctr = 0;
num = new int[5];
String sequance = " ";
int[] random = new int[(int)Math.round(Math.random()* 9)];
//end of declaration
for (int x = 0; x < 5; x++){//random 5 number's
random[x] = (int)Math.round(Math.random() * 9);
System.out.println(random[x]);
}//end of random

do{//looping for 3 time's 5 guesses number
if (ctr == 0)
sequance = "First";
else if (ctr == 1)
sequance = "Second";
else if (ctr == 2)
sequance = "Third";

System.out.println("\n" + sequance+" trial, please Guess 5 number's range from 0-9 \n");
for (int x = 0; x < 5; x++){//Input for 5 number's supply by user
num[x] = Integer.parseInt(input.readLine());
}//end of input
System.out.println("\nList of your " + sequance + " guess 5 lucky number\n");
for (int y=0; y<5;y++){//looping for displaying 5 guesses number
System.out.print(num[y] + ", ");
}
System.out.print("\n\nResult of your lucky 5 number's \n\n");

for (int y = 0; y < 5; y++) {//comparing random and input number's
if (random[y] == num[y]){
System.out.print(num[y]+" ");
result = result + 1;
}

else if (random[y] != num[y]){
System.out.print(" x ");
result1 = result1 + 1;
}
}//end comparing random and input number's

System.out.print("\n\nNumber of correct guesses >> " + result + "\n");

System.out.print("\nNumber of incorrect guesses >> " + result1 + "\n\n\n");

if (result == 5){
System.out.print("\n Congratulation you made a Bull's Eye!!!!");
System.exit(0);
}
result = result - result;
result1 = result1 - result1;


ctr++;

}while(ctr<3);


}// end of function public start

public static void Author()throws Exception{//start of function author
char condition;
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
System.out.print("\n\n\n************************************************");
System.out.print("\n\n\n About the Author\n");

System.out.print("\nName : Rhey Jay A. Maddela\n");
System.out.print("Age : 24\n");
System.out.print("Status : Single\n");
System.out.print("Hobbie : Dota Adik XD\n");
System.out.print("Course : Diploma in Information Technology\n");
System.out.print("Subject: Introduction to Java\n");
System.out.print("Professor : Jay-Arr\n");
System.out.print("Date Created : February 04, 2009\n");
System.out.print("\n\n************************************************");
System.out.print("\n\nWould you like to go back in main menu? Press [Y] Yes | [N] No >> ");
condition = (char)System.in.read();
System.in.read(); System.in.read();
if (condition == 'y')
System.out.print("\n\n ^^ Going back to Main ^^\n\n");
else
{
System.out.print("\n\nProgram Terminated \n\n");
System.exit(0);
}
}//end of function author
}//end of class

this is one of the example of guessing a number can you please send another sample of this problem because this is from my classmate.

Posted by on

  • Anonymous Mar 04, 2009

    Can someone test this program code.. it seems like wrong. ^_^

×

Ad

4 Suggested Answers

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi there,
Save hours of searching online or wasting money on unnecessary repairs by talking to a 6YA Expert who can help you resolve this issue over the phone in a minute or two.

Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.

Here's a link to this great service

Good luck!

Posted on Jan 02, 2017

Ad

SOURCE: I WANT THE WHOLE CODE FOR THIS

This whole code for above we can not give.

Posted on Aug 07, 2009

Ad
  • 87 Answers

SOURCE: What is important about word choice and language when communicating with culturally diverse people? Give examples or reasons for your answer.

Definition of many words have changed over last 100 years, Webster Dictionary (used world wide since late 1800'S) has defined many terms, words, and phrases in a way that has been widely adapted in many nationalities, and popularized in to what we know today as real world speech. Modern day generation, (born 80s to 2017) have introduced a stylish way of redefining uses and meanings of everyday words. Slang pronunciation pertaining to a certain crowd, gang, group, clan, clik, sect, nationality, etc. have also achieved their personal meaning in speech dialect, All is American Slang, criminal slang, back slang, rhyming slang, and other types of slang. Purposefull strong directive words used singularly or/and spoken combined in a certain order/phrase and/or certain tone of voice, mentioned and misused around and within the Not Agreeable crowd will cercaintly have a negative backfire. When just in America in ethnic dominate and divers neighbor hoods, American street English is common and in most areas a need to know language to communicate with the crowd. Street credit/smarts/speech defines personalities judged by the intermediate popular side of general public, and self esteem and confidence are affected by general judgmental society.

Your question is
Importance in word choice/language/dialect/speech/slang directed in converse towards culturally diverse (nationality) populations/groups/types(',goth,jock,skool kid,college,modern teen, hippie,) mexican/Hispanic/Chicano, North-south American, Canadian, russian, asian, American/Black, Native, Pacific islander, Hawaii, ect..

Answers Not Limited to
effort intention of (to) attempt:, to keep a certain level of peace, respect, integrity, reflective society standards, sincere moral gratification, sincere Community awarness, mission for relative public conversations.......ect...

Posted on Mar 26, 2017

itprosfc
  • 213 Answers

SOURCE: What is important about word choice and language when communicating with culturally diverse people? Give examples or reasons for your answer.

For any use of language there have to be certain standards and a base level of communications for said communications to be understood by all parts of society whether those people are from diverse cultures or not. Too many young people have abandoned traditional English and substituted slang in communicating when such usage actually makes understanding of the message difficult if not impossible. It is counter to understanding to abandon clear direct English in favor of stylish bantering. If you want to be taken seriously as a person, you must master the English language and become accomplished in using it. If that is important to you and your future as a responsible citizen and you want an upper middle class position in life you have to understand that business and government depend on the English language for serious matters and not becoming well versed in reading and writing English is a sure way to fail yourself and your future.

Posted on Feb 03, 2018

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

2 Answers

Characteristics of a good teacher


The characteristics of a good teacher:

  • One of the most important attribute of a good teacher is to be a good communicator. He should be comfortable explaining things and enjoy doing the same.
  • At times, a teacher might feel like yelling or shouting at students, but a good teacher is one who knows how to keep the temper in check and act calmly in such situations.
  • A good sense of humor is another great tool that helps a teacher to simplify his task. Wit and humor, when applied in the proper manner, can form an important part of a successful teaching program.
  • A good teacher must have good time management skills and always value the importance of time. In fact, wise utilization of time is the hallmark of a good teacher.
  • A teacher should always adopt a fair attitude, when it comes to making any form of evaluations. He should be fair to his profession and assess students on their performance, instead of personal rapports and likings.
  • A good teacher should have the necessary command over the subject matter he teaches. This way, he can be comfortable while explaining things. Besides, he will be equipped with answers of any possible questions that might crop up during the lecture sessions.
  • A teacher should be dedicated towards his work. He should not kill his time in the classroom and wait for the school bell to ring. Instead, taking out time and engaging in after-school meetings and activities is what suits him.
  • A good teacher should be meticulous and have an eye for detail. In fact, a disorganized person would find the vocation unsuitable and unfulfilling. Well thought-out plans and programs for teaching will assist the productivity of a teacher.
  • A good teacher should be a good leader and a good friend. He should also be a disciplinarian and the students must look up to him. However, this should not stop him from acting like an ally under certain situations.

Mar 05, 2018 | Homework

3 Answers

How to write action research


What is Action Research?
A wide variety of evaluative, investigative, and analytical research methods designed to diagnose problems or weaknesses-whether organizational, academic, or instructional-and help educators develop practical solutions to address them quickly and efficiently.

How to Conduct it?
1. Select a Focus
2. Collect Data
3. Analyze and Interpret Data
4. Take Action
5. Continue this Cycle

Do you Need Help?
Complete this project with the help of Assignment Tutors

Feb 21, 2018 | Homework

1 Answer

Name the additional attractions that the kruger national park offers


Hello, Nqobile -

Do your own school assignment.

If you have a public library (a library funded with local or regional government money), go there and ask a librarian to help you find the information you need.

Best wishes.

Feb 12, 2018 | Homework

3 Answers

What is sociological imagination


The term sociological imagination was coined by the American sociologist C. Wright Mills in 1959 to describe the type of insight offered by the discipline of sociology . The term is used in introductory textbooks in sociology to explain the nature of sociology and its relevance in daily life.

Sociological imagination is not a theory but an outlook of society which tries to steer us into thinking away from one's usual day-to-day life and look at one's life afresh. Specifically, the sociological imagination involves an individual developing a deep understanding of how their biography is a result of historical process and occurs within a larger social context.
Sociological imagination: The application of imaginative thought to the asking and answering of sociological questions. Someone using the sociological imagination "thinks himself away" from the familiar routines of daily life. For Assignment Help and services in Sociological Imagination visit :

All Assignment Help and Solutions Best Assignment Help
loogo-4oqhwc2diduyoedndiofphft-1-0.png

Feb 12, 2018 | Homework

3 Answers

What is important about word choice and language when communicating with culturally diverse people? Give examples or reasons for your answer.


Definition of many words have changed over last 100 years, Webster Dictionary (used world wide since late 1800'S) has defined many terms, words, and phrases in a way that has been widely adapted in many nationalities, and popularized in to what we know today as real world speech. Modern day generation, (born 80s to 2017) have introduced a stylish way of redefining uses and meanings of everyday words. Slang pronunciation pertaining to a certain crowd, gang, group, clan, clik, sect, nationality, etc. have also achieved their personal meaning in speech dialect, All is American Slang, criminal slang, back slang, rhyming slang, and other types of slang. Purposefull strong directive words used singularly or/and spoken combined in a certain order/phrase and/or certain tone of voice, mentioned and misused around and within the Not Agreeable crowd will cercaintly have a negative backfire. When just in America in ethnic dominate and divers neighbor hoods, American street English is common and in most areas a need to know language to communicate with the crowd. Street credit/smarts/speech defines personalities judged by the intermediate popular side of general public, and self esteem and confidence are affected by general judgmental society.

Your question is
Importance in word choice/language/dialect/speech/slang directed in converse towards culturally diverse (nationality) populations/groups/types(',goth,jock,skool kid,college,modern teen, hippie,) mexican/Hispanic/Chicano, North-south American, Canadian, russian, asian, American/Black, Native, Pacific islander, Hawaii, ect..

Answers Not Limited to
effort intention of (to) attempt:, to keep a certain level of peace, respect, integrity, reflective society standards, sincere moral gratification, sincere Community awarness, mission for relative public conversations.......ect...

Mar 26, 2017 | Homework

1 Answer

Why might insurance companies want to know your genotype?


1) Identification (can you imagine how difficult identification may be after an air crash)
2) At some point, doctors will be able to associate certain health risks with particular genes. Insurance companies likely will try to adjust premiums based upon the "risk" they might have to pay for particular treatments. While indivdidual predictions are highly speculative, the insurance industry depends upon population statistics. Those describe the number of people that have the questionalble genes subsequently have a disorder that they are associated with. These are my two "guesses."

Jan 04, 2017 | Homework

6 Answers

SPAM I AM PLEASE DELETE ME


  1. Think -Start thinking about the topic you are going to write by keeping in mind the scope of your dissertation. If you are choosing a general topic write something which is unknown to all.
  2. Plan and research-Now that you got your research topic do a proper planning for your findings related to the topic. Set your time table to do research work. A good dissertation is the outcome of a good plan with detailed research.
  3. Structure-Make sure that your Dissertation Structure contains the followings :-
  • Title page- includes topic name, your name with date.
  • Abstract- a single paragraph briefing about your entire work.
  • Acknowledgement-Thanking those who helped in research.
  • Table of contents- guiding the reader about the chapters.
  • Introduction-An introductory paragraph about the topic.
  • Main body-consists of the detailed description of your topic along with sufficient examples.
  • Conclusion-wind up your dissertation with good suggestions, recommendations.
  • Bibliography -list of your sources for dissertation
  1. Academic style-the dissertation is a piece of academic writing, you should present it in appropriate style. Avoid using profanity. Every sentence should complete with proper punctuation.
  2. Correct Referencing-A good referencing will acknowledge your work and maintains originality. So it is a must do in every dissertation make sure that it is done correctly.

dissertation-writing-help-35hiarukvog2usf1qouvi3qk-5-0.jpg
Looking for thesis help? "CLICK HERE"

Sep 09, 2014 | Homework

Not finding what you are looking for?
Homework Logo

Related Topics:

71 people viewed this question

Ask a Question

Usually answered in minutes!

Top Homework Experts

Geoff White
Geoff White

Level 3 Expert

1934 Answers

Brett Duxbury
Brett Duxbury

Level 3 Expert

4205 Answers

Are you a Homework Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...