Re: can anybody solve my problems?



On Fri, 23 Jan 2009 03:53:20 -0800 (PST), uday maharshi
<maharshi.muk@xxxxxxxxx> wrote:

i have to problems....cld ny body solve it for me.....this programs
are to be done java programming language
Please do not use txt, use English:
I have two problems....could any body solve them for me.....these
programs are to be done java programming language


1. Write a program to sort a list of words and sort a list of numbers.
Input can be read from Command prompt or a file.
This looks very much like homework. We will not do you homework for
you, but we will help you to do it for yourself.

As Sabine said, start very simple. Write a program to read one word
from the Command prompt into your program and copy that word back out
to the screen. Test your simple program. If you find problems then
fix them and test again. If you cannot fix them then you can ask your
instructor or post your program here and we will help. Do not go on
until your program is working properly. The testing is important as
you will build on this program later - you need to know that what you
are building on is working properly.

Now extend you first program to read more than one word from the
keyboard and echo them all back to the screen. Test and fix. Get
help as required.

Now extend your program to sort the list of words before echoing them
back to the screen. Test and fix.

Extend your program to deal with numbers as well as words. Test and
fix.

Extend your program to take input from a file as well as from the
command prompt. Test and fix.

Congratulations, you have answered the first question.


2. Write a program to store a set of telephone numbers in a text file
and display them in ascending order based on the user's input.
Each time the program is invoked, store the numbers in a text file
& each time the phone numbers should get appended to the initial
content of that text file.
Provide a command prompt menu for the user to either store or view
the phone numbers.
Also perform validation of the input provided by the user to
ensure that they enter valid phone numbers.
Use the same incremental approach. Start with a very simple program
and extend it by incorporating more of the problem as you proceed.
Test and fix after every step.

rossum

.



Relevant Pages

  • Re: Set as desktp background problems
    ... Possibly this will sort things out for you. ... either a 'Command Prompt' or the "Run" box on the 'Start menu': ... ...then reboot your machine for the 'fix' to take effect. ... ago that function just stopped working does anyone know how to fix this ...
    (microsoft.public.windowsxp.configuration_manage)
  • RE: ntldr missing...
    ... I am using 'XP Professional' and I am finding it difficult to fix the 'ntldr ... The pc stops booting as it is not finding the 'ntldr'. ... administrator password from the command prompt. ... Boot up with your CD in the CD Rom and when you presented with Windows Setup ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Windows Explorer opens to command prompt
    ... to fix command prompt. ... It isn't JUST context menu thingies, it may be thumbnail generators, or other things. ... but not any other folders so far. ... Do you happen to have the Add Command Prompt Here Shortcut to Windows ...
    (microsoft.public.windowsxp.newusers)
  • Re: Windows Explorer opens to command prompt
    ... to fix command prompt. ... It isn't JUST context menu thingies, it may be thumbnail generators, or other things. ... but not any other folders so far. ... Do you happen to have the Add Command Prompt Here Shortcut to Windows ...
    (microsoft.public.windowsxp.newusers)
  • Re: MAPI Messages GetNext() throws exception when read receipt in
    ... I'd suspect the problem is exactly the sort of mysterious ... and the fix is either to stop using .Net ... what would you recommend instead of using CDO 1.21. ... > an exchange mailbox using CDO. ...
    (microsoft.public.win32.programmer.messaging)