Computer ForumsComputers  

Go Back   Computer Forums > Programmers Lounge > Programming Discussions

Reply
 
LinkBack Thread Tools Display Modes
Old 08-15-2005, 05:23 PM   #1 (permalink)
Newb Techie
 
Join Date: Aug 2005
Posts: 16
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   Reply With Quote
Old 08-15-2005, 06:12 PM   #2 (permalink)
Monster Techie
 
Join Date: Jul 2003
Posts: 1,179
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.
__________________
www.upstark.com
Emily is offline   Reply With Quote
Old 08-16-2005, 03:53 PM   #3 (permalink)
Ultra Techie
 
Join Date: Oct 2003
Posts: 544
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   Reply With Quote
Old 08-17-2005, 04:28 PM   #4 (permalink)
Newb Techie
 
Join Date: Aug 2005
Posts: 16
Default

Do you know how to open a new console in Java during a program
bart is offline   Reply With Quote
Old 08-18-2005, 03:24 PM   #5 (permalink)
Ultra Techie
 
Join Date: Oct 2003
Posts: 544
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 Page Ranking = 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   Reply With Quote
Old 08-19-2005, 04:06 PM   #6 (permalink)
Ultra Techie
 
Join Date: Aug 2005
Posts: 656
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   Reply With Quote
Old 08-20-2005, 05:06 AM   #7 (permalink)
Newb Techie
 
Join Date: Aug 2005
Posts: 16
Default

Thanks
bart is offline   Reply With Quote
Reply

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



All times are GMT -5. The time now is 10:35 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0