• Post Reply Bookmark Topic Watch Topic
  • New Topic

program for calculating electricity usage.  RSS feed

 
Greenhorn
Posts: 4
MS IE Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

very new to java. not even 1 month I guess. but we were given assignment to complete a charge calculator of N number of customers (n being the highest number in my student number, which is 8). so how do I go about wrting a program from scratch and wht program to use. netbeans or textpad.
 
Ranch Hand
Posts: 58
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

In terms of which IDE to use, I'd go with whatever your lecturer recommends. If they're leaving it up to you, I'd recommend NetBeans for beginners.

The first step in developing any program is making sure you're 100% clear on the requirements. Can you be more explicit on: What are the inputs to the program? What are the expected outputs?

It sounds like they're simply introducing you to iteration, so I would make sure that you're familiar with how the for loop and enhanced for loop (foreach) work. (Java8's Streams API does provide nicer ways to do this, but I'd start simple.)

First things first though: clarify your requirements.
 
Marshal
Posts: 56600
172
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch
Chhitiz Sharma wrote:. . . netbeans or textpad.
At the moment neither. Pencil paper and eraser. That is what you need now. When you have worked out what you are going to write, use a text editor, not an IDE. We have an FAQ about editors. Nobody seems to be familiar with textpad. Don't use Notepad.

IDEs are really useful when you are experienced and they will let you write code faster, but for beginners they probably simply steepen the learning curve.
 
Campbell Ritchie
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I have found out why nobody described textpad. You have to pay for it
 
Chhitiz Sharma
Greenhorn
Posts: 4
MS IE Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:Welcome to the Ranch
Chhitiz Sharma wrote:. . . netbeans or textpad.
At the moment neither. Pencil paper and eraser. That is what you need now. When you have worked out what you are going to write, use a text editor, not an IDE. We have an FAQ about editors. Nobody seems to be familiar with textpad. Don't use Notepad.

IDEs are really useful when you are experienced and they will let you write code faster, but for beginners they probably simply steepen the learning curve.


thanks will do that. start with algorithm and then try to put in the textpad.
 
Chhitiz Sharma
Greenhorn
Posts: 4
MS IE Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:I think I have found out why nobody described textpad. You have to pay for it



you can still download and install textpad and use it full featured without paying. all you get is an occasional pop-ups regarding paying or continuing free. so no dramas there. the reason I like it is it's like any notepad but helps indenting the code.
 
Ranch Hand
Posts: 614
9
BSD Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can try Notepad++.
It will also help indenting code without any occasional pop ups.
 
Campbell Ritchie
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Notepad++? An excellent product
 
Gordon Brown
Ranch Hand
Posts: 58
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agreed: NotePad++ is an excellent choice. It's free, you get syntax highlighting (for numerous languages), and you avoid the learning overheads of an IDE when you're just starting out.
 
Campbell Ritchie
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You also get automatic indentation, bracket matching and automatic conversion of tab→4 spaces.
 
Ranch Hand
Posts: 57
3
Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Textpad is okay in my opinion, but when I say okay, I mean I use Notepad++ for almost everything instead. I use textpad mostly for handling and searching through massive amounts of text (30,000+ lines).

So, yeah, as far as programming goes, if you're using a text editor, Notepad++ is great.

Depending on how adept you are with programming and computers, I'd suggest taking a look at the Eclipse IDE - a lot of people will say it's not for beginners, but I've been using it practically my entire programming career and haven't had many issues learning the basics, plus the more I use it the more great tricks I learn with it. Even if you aren't 100% ready for it right now, if you discover you want to continue programming, I highly recommend you look into it.
 
Ranch Hand
Posts: 221
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once upon a time, I was a great believer in IDEs. Like so many here, I grew up with punchcards and numerous printouts of error messages. I learned to love the ability to set breakpoints, step though the interactive debugger, and what have you that had become so standard with Microsoft's programming environments. And I agree, learning a given IDE when starting out doesn't add that much to the learning curve. Besides, there are a boatload and a half of tutorials on youtube to help with the more advanced features.

Having moved to Java, I have found myself transitioning back to text editors and foregoing the IDE. Having been bitten by the hidden "features" of Eclipse, et. all doing behind the scenes processing, I found it much more reliable to control my own environment. Once one comes to understand the directory structure and how packages work, it becomes a simple matter to modify and 'source ~./bashrc' to load my environment variables on the fly.

Hope I didn't ramble too much (it's early and I'm only on my second cup of coffee).

Regards,
Robert
 
Robert D. Smith
Ranch Hand
Posts: 221
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<never mind> < Need more coffee. >

Regards
Robert.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!