Hey, i was wondering if anyone could help me.
i have two questions that i cannot complete for a homework assignment:
[1] This method should convert its parameter (a string like "3.1415") to the corresponding value of type double. If the string supplied is not a valid number, it should return 0.0 as its result. Note that you can use the method Double.parseDou ble() to do the hard work for you.
--------------------------------------------------------------------------------...
User Profile
Collapse
-
homework help? doubles.
-
sorry to have to ask for help again. but i dont really understand what im trying to do.
I have to :
create a new method to make multiple copies:
public int printMany(Strin g text, int number)
This should try to make as many copies of the string as are passed to it as number
(so printMany("test ",7) should produce 7 copies).
It should use printOne() to actually produce the copy.
... -
yes i do.
thanks so much. been trying to figure that out for days haha. you're a saint. x...Leave a comment:
-
nope i dont need to. ive been set an assignment and i have to use boolean in this part of the method. i cant get it to work though. x...Leave a comment:
-
i've been told i have to use boolean (not sure why). if i have to use boolean, how do i make the code do what i need it to?
thanks xLeave a comment:
-
sorry to post again today, but im trying to figure out why my code isnt doing what i want.
Im trying to get the code to add 1 from sheets printed when a print has occured and minus 1 from prints available.
This is the code i have been using:
[CODE=java]public boolean printOne(String text)
{
System.out.prin tln("Test printOne");
return sheets == sheets...Leave a comment:
-
my code isn't working- can anyone assist?
sorry to post again today, but im trying to figure out why my code isnt doing what i want.
Im trying to get the code to add 1 from sheets printed when a print has occured and minus 1 from prints available.
This is the code i have been using:
...Code:public boolean printOne(String text) { System.out.println("Test printOne"); return sheets == sheets -
can anyone help me? newbie- code errors!
can anyone help me? code errors!
--------------------------------------------------------------------------------
im creating a code for a printer. the question i am trying to answer is :
MyPrinter needs some printing methods. The first, signature:
public boolean printOne(String text) {}
should take a String as a parameter, and output it on a single line to the terminal window.
It should... -
can anyone help me? code errors!
im creating a code for a printer. the question i am trying to answer is :
MyPrinter needs some printing methods. The first, signature:
public boolean printOne(String text) {}
should take a String as a parameter, and output it on a single line to the terminal window.
It should also increment (add 1 to) the total number of copies made, and decrement (subtract 1 from) the number of sheets of paper available. ...
No activity results to display
Show More
Leave a comment: