Sythe.Org Forums     Register     FAQ     Members List     Calendar     Mark Forums Read    
 
Sythe.Org Forums  
   Runescape Gold

Sythe.org — A Virtual Goods Trading Hub

Make real cash! buying and selling in-game items.

We have a no-scam policy.

You can make thousands playing your favourite games here at Sythe.org.

Just sign up an account and follow the rules!


Take me to

Runescape Markets

Other Game Markets

Support Center

Register an Account

Close
Need help with easy java hw problem
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 09-19-2010, 08:09 PM
Xeox's Avatar
Forum Addict
$25 USD Donor
 
Join Date: Jun 2010
Location: Watertown, CT
Posts: 346
Send a message via MSN to Xeox
Lightning Need help with easy java hw problem

The problem asks you to write a program DarkerDemo that constructs a Color object ( in my case the problem is telling me to make the object Color.RED), and apply the darker method twice, then print the red, green, and blue values of the resulting color (wont be able to actually see the color).

Can anyone help me out here?

***I am programming using BlueJay***
__________________
Reply With Quote
  #2  
Old 09-19-2010, 09:43 PM
Guru
 
Join Date: Jun 2005
Location: Canada
Posts: 1,844
Default Re: Need help with easy java hw problem

I'm a little confused as to what exactly you are trying to do.

I would need more information or a clearer explanation.
__________________

Reply With Quote
  #3  
Old 09-19-2010, 10:10 PM
Xeox's Avatar
Forum Addict
$25 USD Donor
 
Join Date: Jun 2010
Location: Watertown, CT
Posts: 346
Send a message via MSN to Xeox
Default Re: Need help with easy java hw problem

alright i know I didnt explain it that well...

basically I need to create a color using the 0-255 color scale (or whatever you call it), I need to then make it darker by using the 'darker' method, and then I need to write the program to tell me what the new color scale numbers would be.

For example...
i input the color (255, 0, 255)
The program makes this color darker...
then tells me the new color in number form.
__________________
Reply With Quote
  #4  
Old 09-20-2010, 03:04 AM
cp's Avatar
an cat
Mudkips Java Programmers Visual Basic Programmers Ex-Moderator
 
Join Date: Jan 2007
Location: [+]
Posts: 3,286
Default Re: Need help with easy java hw problem

Code:
Color myColor = new Color(255,0,255);
myColor.darken();
myColor.darken();
System.out.println(myColor.getColor());
It should probably look something like this, aside from names etc. When you darken a color, each R/G/B value decreases. Do you understand how to go about it now?
__________________
Do you like bitcoins? Do you want to buy or sell bitcoins? PM me or check out this thread.
Ex-programming mod, Ex-market mod, Ex-Head User Educator, Ex-Global Mod
Reply With Quote
  #5  
Old 09-20-2010, 07:13 PM
Xeox's Avatar
Forum Addict
$25 USD Donor
 
Join Date: Jun 2010
Location: Watertown, CT
Posts: 346
Send a message via MSN to Xeox
Default Re: Need help with easy java hw problem

yea thanks =)

I went wrong when I was typing in the darker method...I used

Color.darken();
instead of myColor.darken();

=\
__________________

Last edited by Xeox : 09-20-2010 at 07:14 PM.
Reply With Quote
  #6  
Old 09-21-2010, 01:47 PM
Xeox's Avatar
Forum Addict
$25 USD Donor
 
Join Date: Jun 2010
Location: Watertown, CT
Posts: 346
Send a message via MSN to Xeox
Default Re: Need help with easy java hw problem

This thread can be closed I got my answer
__________________

Last edited by Xeox : 09-24-2010 at 11:00 AM.
Reply With Quote
Reply



Cheap RS Gold Store  Runescape Gold

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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

All times are GMT +1. The time now is 04:07 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.1