The Artima Developer Community
Sponsored Link

Java Answers Forum
Plz, help me some exercises

1 reply on 1 page. Most recent reply: Jan 11, 2010 12:59 AM by Kondwani Mkandawire

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
copy right

Posts: 1
Nickname: tamcisco
Registered: Jan, 2010

Plz, help me some exercises Posted: Jan 11, 2010 12:40 AM
Reply to this message Reply
Advertisement
Hi, everybody, I a newbie in Java Program. I have some exercises java. The deadline is 12-Jan-2010.

Exercise 1 : Create a Java console program that will ask the user to input a string and then sort the individual characters into ascending order. For example if the user input:

Input a String : HelloWorld

Output is : edHllloorW

=========================

Exsercise 2: Write an applet program that will sort the content of a file in descending order. For example:

“Sample.txt” contains the following numbers.
Base, Ace, Lace, Dice

The applet program must read the file, sort the content and then store/write the sorted list into another file in this case “SampleOutput.txt”.

So SampleOutput.txt would have the list:
Lace, Dice, Base, Ace

=========================

Exercise 3: Write a console program that allows a user to input 10 different numbers, sort it (ascending/descending) and will display the highest and lowest number.

=========================

Exercise 4 :Assuming that the user would input a series of phrase or word. Take a look at the example below:

Input a String: The@quick brown’ fox)) jump over## the lazy dog.

==========================

Exercise 5 :Create a program that will remove unnecessary characters or special characters from the string input of a user. If the program created is correct, then the output of the said input above would be:

Output: The quick brown fox jump over the lazy dog.

===========================

Exercise 6 :If the user inputs a series of numbers and string, write a program to sort the said input in descending order starting from alphabets followed by numbers.

Example:

Input : apple, banana, two, 5, 7, 1, mango

Output : two, mango, banana, apple, 7, 5, 1

NOTESS : I only using jdk 1.3. Not allow using higher version of jdk .(That my teacher said)
And using jcreator, notepad or textpad. Not allow using netbean or eclip

Thanks so much for your support


Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: Plz, help me some exercises Posted: Jan 11, 2010 12:59 AM
Reply to this message Reply
Google Java Tutorial

Flat View: This topic has 1 reply on 1 page
Topic: Java and Hibernate Previous Topic   Next Topic Topic: MooreQuery

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use