1,105,644 Community Members

Please can anyone help solve this ?

Member Avatar
jennyb
Newbie Poster
3 posts since Jan 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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

Member Avatar
NormR1
Posting Sage
7,723 posts since Jun 2010
Reputation Points: 563 [?]
Q&As Helped to Solve: 793 [?]
Skill Endorsements: 16 [?]
Team Colleague
 
0
 

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

Member Avatar
jennyb
Newbie Poster
3 posts since Jan 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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 !

Member Avatar
NormR1
Posting Sage
7,723 posts since Jun 2010
Reputation Points: 563 [?]
Q&As Helped to Solve: 793 [?]
Skill Endorsements: 16 [?]
Team Colleague
 
0
 

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

Member Avatar
Philippe.Lahaie
Posting Whiz
376 posts since Oct 2007
Reputation Points: 42 [?]
Q&As Helped to Solve: 61 [?]
Skill Endorsements: 9 [?]
 
0
 

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

Member Avatar
Ezzaral
Posting Sage
7,431 posts since May 2007
Reputation Points: 2,714 [?]
Q&As Helped to Solve: 953 [?]
Skill Endorsements: 31 [?]
Moderator
Featured
 
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.

Member Avatar
hfx642
Posting Pro
515 posts since Nov 2009
Reputation Points: 164 [?]
Q&As Helped to Solve: 105 [?]
Skill Endorsements: 1 [?]
 
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.

Member Avatar
scrappy57
Newbie Poster
15 posts since Mar 2010
Reputation Points: -1 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
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 ");
}
Member Avatar
stultuske
Posting Expert
5,351 posts since Jan 2007
Reputation Points: 938 [?]
Q&As Helped to Solve: 784 [?]
Skill Endorsements: 35 [?]
Featured
 
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? :)

Member Avatar
jennyb
Newbie Poster
3 posts since Jan 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Hi all

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

Many thanks

Member Avatar
stultuske
Posting Expert
5,351 posts since Jan 2007
Reputation Points: 938 [?]
Q&As Helped to Solve: 784 [?]
Skill Endorsements: 35 [?]
Featured
 
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 NormR1, stultuske, scrappy57 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: