954,545 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Please can anyone help solve this ?

Application coding
Project Name: PhoneProblem

Write a program which allows the user to input information to solve the following problem:

“Sometimes it’s difficult to decide which phone to use – my mobile phone or my home phone. If I’ve got free minutes left on my mobile phone, then I use them – but only if I’m calling a land line or the person I want to call uses the same network provider that I have. If I don’t have free minutes left, then I use the home phone (as long as I’m at home) – unless it’s on the same network, in which case it’s still cheaper to use the mobile. Having said that, sometimes my flatmate is on the home phone, and so if it’s urgent I have to use my mobile anyway. If it is not urgent then I will wait until my flatmate has finished then use the home phone”.

Anyone who can make this work , I am truly grateful, Ive spent hours making flow diagrams and doing psuedo code and to no avail. Many thanks, Jenny

jennyb
Newbie Poster
3 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

Where are you stuck? Do you have any specific questions about the program?

NormR1
Posting Expert
Moderator
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656
 
Where are you stuck? Do you have any specific questions about the program?


Thanks so much for coming back to me, Specific no, all of it yes. I have not choice but to do the code, but I cant break down the pseudo code into an actual Java application.

Im not a techy, nor do I pretend to be, I really need a kind person who will put the problem into a java application. )

Im a girl in desperation !

jennyb
Newbie Poster
3 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

Sounds like you need to hire a programmer if you're not interested in learning how to program.

NormR1
Posting Expert
Moderator
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656
 

show us some of your pseudocode so we can see if theres something wrong with that first

Philippe.Lahaie
Posting Whiz
326 posts since Oct 2007
Reputation Points: 103
Solved Threads: 45
 

Im not a techy, nor do I pretend to be, I really need a kind person who will put the problem into a java application. )

Im a girl in desperation !


You're also a girl violating the forum rule about showing effort if you expect help with homework assigments .

If you can't show that you have made the slightest effort yourself, this thread will be closed. Post code, psuedocode, or at least specific questions that might indicate you are anything other than another lazy student wanting others to do their assignment for them.

Ball is in your court.

Ezzaral
Posting Genius
Moderator
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
 

The simplest way is...
At the beginning of your program, set a variable.
Using a bunch of "if"s to test all of your conditions, reset the variable.
Your answer will be the value of the variable at the end of all of your "if"s.

hfx642
Posting Pro
515 posts since Nov 2009
Reputation Points: 248
Solved Threads: 105
 

if (question posted == assignment)
{
if( effort == 0 )
{
S.O.P("U r not in the rite place");
}
else
{
S.o.p("Explain your effort and which part in your code your are struggling with ");
}

}

else
{
S.o.p("Explain your effort and which part in your code your are struggling with ");
}

scrappy57
Newbie Poster
12 posts since Mar 2010
Reputation Points: 9
Solved Threads: 1
 

if (question posted == assignment) { if( effort == 0 ) { S.O.P("U r not in the rite place"); } else { S.o.p("Explain your effort and which part in your code your are struggling with "); }

}

else { S.o.p("Explain your effort and which part in your code your are struggling with "); }


I doubt that you'll need that nested if there.
it's like testing:

boolean a = getBoolValue();
// a = random true or false
if ( a ){
if ( a ){
// print A
}
else{
// print B
}
}
else{
// print C
}

can you come up with one scenario where B will ever be printed? :)

stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
 

Hi all

Please ignore this question and thread as I have managed to resolve it myself.

Many thanks

jennyb
Newbie Poster
3 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

well, you can mark this thread as solved, to show that to the other posters.
you could also, if you want to :)
post your solution to the problem you had, so that those who look for it in the future might find it helpfull

stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: