1.11M Members

Please can anyone help solve this ?

 
0
 

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

 
0
 

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

 
0
 

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 !

 
0
 

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

 
0
 

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

 
0
 

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.

 
0
 

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.

 
0
 
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 ");
}
 
0
 

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? :)

 
0
 

Hi all

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

Many thanks

 
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

Question Answered as of 2 Years Ago by stultuske, NormR1, Ezzaral and 3 others
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: