d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Looking For Help With Java.
Add Reply New Topic New Poll
Member
Posts: 31,187
Joined: Aug 31 2008
Gold: 28,306.50
Trader: Trusted
Oct 2 2012 11:02am
If anyone can assist me with some knowledge and advise it would be greatly appreciated.

I am just starting to code and java is my first language,

I've done a few basic programs but I still have a hard time grasping some concepts and would like some help with a looping statement.

so if you can help a newbie/beginner please post or send me a pm.
Member
Posts: 4,605
Joined: Sep 15 2011
Gold: 9,464.00
Oct 2 2012 11:10am
this isn't a trading forum. just post your question

This post was edited by irimi on Oct 2 2012 11:10am
Member
Posts: 31,187
Joined: Aug 31 2008
Gold: 28,306.50
Trader: Trusted
Oct 2 2012 12:37pm
I want private help, its not just a question.
Member
Posts: 11,637
Joined: Feb 2 2004
Gold: 434.84
Oct 2 2012 01:20pm
Quote (Phyxios @ Oct 2 2012 01:37pm)
I want private help, its not just a question.


Does your "Hello, World" code contain state secrets? Why can't you post it here and get a lot of help without paying for it?
Member
Posts: 31,187
Joined: Aug 31 2008
Gold: 28,306.50
Trader: Trusted
Oct 2 2012 03:39pm
Quote (rockonkenshin @ Oct 2 2012 02:20pm)
Does your "Hello, World" code contain state secrets? Why can't you post it here and get a lot of help without paying for it?


Lol its more to the fact im a bit unsure of where to start with my loop program im writing.

one moment ill get on my laptop and edit this post.

here is my assignment.

http://i.imgur.com/nVOkh.png
http://imgur.com/bXTO1
http://imgur.com/6yzSL
http://imgur.com/E3Vaq

for the assignment ill be using java's util.Scanner / the console

in BlueJ

This post was edited by Phyxios on Oct 2 2012 04:01pm
Member
Posts: 4,605
Joined: Sep 15 2011
Gold: 9,464.00
Oct 2 2012 04:28pm
Were you not provided skeletal code to work with? Are you supposed to write this from scratch?
Member
Posts: 31,187
Joined: Aug 31 2008
Gold: 28,306.50
Trader: Trusted
Oct 2 2012 04:31pm
Quote (irimi @ Oct 2 2012 05:28pm)
Were you not provided skeletal code to work with?  Are you supposed to write this from scratch?


yep.. from scratch >.>

This post was edited by Phyxios on Oct 2 2012 04:31pm
Member
Posts: 4,605
Joined: Sep 15 2011
Gold: 9,464.00
Oct 2 2012 05:56pm
I don't work in PMs, sorry. If you want/expect help, you should really be posting here. Get over your own ego and learn to deal with critique and criticism alike.

This post was edited by irimi on Oct 2 2012 05:56pm
Member
Posts: 24,101
Joined: Nov 8 2007
Gold: 5,561.70
Oct 3 2012 07:44pm
They didn't tell you what methods were required or anything?

Your question is vague as fuck, have you tried implementing anything yet?



Based off of the pics:


1) Just a simple int input, check if the input is > 0, if not print out a statement saying "value is less than 0" loop until they enter a value > 0 (while value <= 0)

2) Just a simple char input, check if the input is C or R or M, if it is not, loop until one of those values is entered (while value != C || value != M || value != R) If the character isn't one of those throw a print statement saying invalid value or whatever

3) Easy just print out the values from 1 and 2

4) Prompt the user for a character value 'y' or 'n', if not use a while loop until they do put in the correct value

Use an if/else statement inside the while loop (while not y or not n) and if y do 1 and 2 (can just copy and paste code, or make it a separate method and call that method)

If n, break

5) You can append the string outputs together, or if you know how to use arrays everytime you do 1 and 2, add the values to the array to store for later use

Iterate through the array to print out the values you need.



To be honest don't know how much you know so..there are much better ways to implement this code with more advanced features, but this is a basic way.

This post was edited by lopelurag on Oct 3 2012 08:01pm
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll