Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » What basic programs are there to make
Closed Thread
Old 08-15-2005, 05:23 PM   #1 (permalink)
 
Newb Techie

Join Date: Aug 2005

Posts: 16

bart

Question What basic programs are there to make

Hi all,

I have learnt how to make basic programs but don't have very many ideas if anyone has some ideasor advise they could give I would be greatfull.

P.S I am programing in Java

Thanks
Attached Images
 
bart is offline  
Old 08-15-2005, 06:12 PM   #2 (permalink)
 
Monster Techie

Join Date: Jul 2003

Posts: 1,179

Emily is on a distinguished road

Send a message via AIM to Emily
Default

Do something with recursion, like a program that computes factorials. Or if you want something a little harder, do something like Knight's Tour. Or program some common searching or sorting algorithms.
__________________
<a href=\"http://www.upstark.com\">www.upstark.com</a>
Emily is offline  
Old 08-16-2005, 03:53 PM   #3 (permalink)
 
Ultra Techie

Join Date: Oct 2003

Posts: 544

fitzjj

Default

"hello world"


...or if you are up for something more challenging play around with some datastructures. try writing some hashtables or something - at the end of the day most programs rely on a datastructure of some sort.

Have you played around with swing yet, that may take a bit of learning.

before you do anything in java though make sure you have classes sussed, else you are not coding well.
fitzjj is offline  
Old 08-17-2005, 04:28 PM   #4 (permalink)
 
Newb Techie

Join Date: Aug 2005

Posts: 16

bart

Default

Do you know how to open a new console in Java during a program
bart is offline  
Old 08-18-2005, 03:24 PM   #5 (permalink)
 
Ultra Techie

Join Date: Oct 2003

Posts: 544

fitzjj

Default

your console is an application, in windows it is cmd.exe, under linux it would just be another shell, so you could use the same method to run other programs if you like... dont have any code so this is from memory and will probably need googling to correct:

create a Process object

get hold of the runtime object associated with the current java application.

call the exec method of the runtime object passing the application name as an argument.

e.g.
Code:
Process pr = Runtime.getRuntime().exec("cmd.exe")
so if you replaced cmd.exe with notepad it would hopefully fire up notepad or something like that.

good luck
fitzjj is offline  
Old 08-19-2005, 04:06 PM   #6 (permalink)
 
Ultra Techie

Join Date: Aug 2005

Posts: 656

dnoch

Default

Make a program (without graphics) that is relevant in your life. eg: a progfam that inputs your favourite TV programs and prints you a timetable for the week
dnoch is offline  
Old 08-20-2005, 05:06 AM   #7 (permalink)
 
Newb Techie

Join Date: Aug 2005

Posts: 16

bart

Default

Thanks
bart is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On