Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

java programming help for school due tonight.


  • Please log in to reply
14 replies to this topic

#1 Eshlil

Eshlil

  • Members
  • 20 posts
  • OFFLINE
  •  
  • Local time:12:16 PM

Posted 14 March 2010 - 03:03 PM

Thanks for the help got it

Mods can delete this topic.

Thanks for the help. :thumbsup:

Edited by Eshlil, 15 March 2010 - 12:18 AM.


BC AdBot (Login to Remove)

 


#2 Billy O'Neal

Billy O'Neal

    Visual C++ STL Maintainer


  • Malware Response Team
  • 12,304 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Redmond, Washington
  • Local time:12:16 PM

Posted 14 March 2010 - 03:10 PM

We are not going to do your homework for you. Nice try though.

Billy3
Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)
Posted Image

#3 Eshlil

Eshlil
  • Topic Starter

  • Members
  • 20 posts
  • OFFLINE
  •  
  • Local time:12:16 PM

Posted 14 March 2010 - 03:17 PM

yea I know but if you know any examples I can use, I'm confused on the methods part

Edited by Eshlil, 15 March 2010 - 12:15 AM.


#4 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:01:16 PM

Posted 14 March 2010 - 03:24 PM

Funny. Everybody always tells me that their teacher can't teach. We will not do your homework for you, but if you post your code, we will help you work through it.

EDIT: If oyu know what a function is, then you know what a method is. They work exactly the same. :thumbsup:

#5 Eshlil

Eshlil
  • Topic Starter

  • Members
  • 20 posts
  • OFFLINE
  •  
  • Local time:12:16 PM

Posted 14 March 2010 - 03:29 PM

Thanks

Edited by Eshlil, 15 March 2010 - 12:15 AM.


#6 Eshlil

Eshlil
  • Topic Starter

  • Members
  • 20 posts
  • OFFLINE
  •  
  • Local time:12:16 PM

Posted 14 March 2010 - 03:59 PM

Do you guys recommend an if statement?

#7 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:01:16 PM

Posted 14 March 2010 - 04:27 PM

Do you guys recommend an if statement?

Perhaps. What would you use it for?

#8 Eshlil

Eshlil
  • Topic Starter

  • Members
  • 20 posts
  • OFFLINE
  •  
  • Local time:12:16 PM

Posted 14 March 2010 - 04:28 PM

I'm trying to make this read a character or letter not a number, so service is a letter.

if(!service.trim().equals("")){
serviceType =Integer.parseInt(service);
i tried something like this seriviceType = char.parse
or is something else?

#9 Eshlil

Eshlil
  • Topic Starter

  • Members
  • 20 posts
  • OFFLINE
  •  
  • Local time:12:16 PM

Posted 14 March 2010 - 04:31 PM

why I would choose it, in choosing which service type it is. and if its an suv or not. But not sure if statement would work the best.


Thanks for the help

Edited by Eshlil, 14 March 2010 - 04:36 PM.


#10 Eshlil

Eshlil
  • Topic Starter

  • Members
  • 20 posts
  • OFFLINE
  •  
  • Local time:12:16 PM

Posted 14 March 2010 - 04:41 PM

typeIn = JOptionPane.showInputDialog("Enter service type");
serviceType = typeIn.charAt(0);
serviceType = Character.toUpperCase(serviceType);
while (serviceType != 'W')
{
suv = JOptionPane.showInputDialog("if suv or not?");

or is this a better way of doing it?

#11 Eshlil

Eshlil
  • Topic Starter

  • Members
  • 20 posts
  • OFFLINE
  •  
  • Local time:12:16 PM

Posted 14 March 2010 - 04:48 PM

I have an example but rather than integer im trying to use characters
//Convert to integer
if(!snumber.trim().equals("")){
number = Integer.parseInt(snumber);
}
}while( !(number>=0 && number <=3));
if(number==0){
break;
}
do{
quantity=-1;
squantity = JOptionPane.showInputDialog(null,
"Enter Quantiy", "Input quantity",
JOptionPane.QUESTION_MESSAGE);

#12 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:01:16 PM

Posted 14 March 2010 - 05:44 PM

You want to use a char?
if(myVariable =='a'){
   //then do something
}else if(myVariable =='b'){
  //do something else
}

Is this for high school or college?

#13 Eshlil

Eshlil
  • Topic Starter

  • Members
  • 20 posts
  • OFFLINE
  •  
  • Local time:12:16 PM

Posted 14 March 2010 - 11:00 PM

Thanks I got it

Edited by Eshlil, 15 March 2010 - 12:14 AM.


#14 chrispyslice

chrispyslice

  • Members
  • 19 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:08:16 PM

Posted 21 March 2010 - 12:41 PM

Eshlil, why did you remove all your posts? Now no-one else with a similar problem can see how you fixed it.
MacBook Pro (mid 2009)
Microsoft Certified Professional
Microsoft Certified Desktop Support Technician
Do not PM me about posts - use the reply button!
Search for solutions at Microsoft FixIt

#15 JJ2K

JJ2K

  • Members
  • 162 posts
  • OFFLINE
  •  
  • Local time:02:16 PM

Posted 22 March 2010 - 03:29 PM

How old are you, never knew they taught this sort of stuff in school




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users