Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,055 members, 7,810,945 topics. Date: Saturday, 27 April 2024 at 07:05 PM

Java Programmers Pls Your Help Is Needed - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Java Programmers Pls Your Help Is Needed (1545 Views)

PHP Programmers, Pls Step In / Programmers Pls Help A Beginner! / How Long Did It Take You Guys To Become Strong Java Programmers (2) (3) (4)

(1) (Reply) (Go Down)

Java Programmers Pls Your Help Is Needed by Richhommie(m): 2:20pm On Jan 05, 2015
Please can anyone in the house help me with these problems. I would really appreciate it .
Thanks in advance

Methods should be implemented in java

1. Given the functions
f(a,b)=4a - 8b=0
g(x,y)= 9x^2 - 3y=0
,implement a method that resolves
h(x,y,a,b)= 2g(x,y)^f(a,b) (^ means raised to the power)

Show results for 10 different values in a tabular form as shown below

S/n. x. y. a. b. h(x,y,a,b)
1
2
3
4
5
6
7
8
9
10



2. Given that. f(n)=f(n -1)+ f(n - 2)
where f(0)= f(1)= 5.
And n>1; implement a method for evaluating f(n) using recursion.
Re: Java Programmers Pls Your Help Is Needed by jaelz(m): 6:28pm On Jan 05, 2015
How much would you pay
Re: Java Programmers Pls Your Help Is Needed by Richhommie(m): 7:29pm On Jan 05, 2015
jaelz:
How much would you pay
10 naira.

1 Like

Re: Java Programmers Pls Your Help Is Needed by YourCrush: 10:39pm On Jan 05, 2015
Richhommie:

10 naira.




You are not ready to learn

1 Like

Re: Java Programmers Pls Your Help Is Needed by jaelz(m): 10:43pm On Jan 05, 2015
Thanks help me tell d him
Re: Java Programmers Pls Your Help Is Needed by phpier: 7:00am On Jan 06, 2015
do u wnt us to solve d whole problem or u av a question 2 ask ??

1 Like

Re: Java Programmers Pls Your Help Is Needed by Richhommie(m): 11:55am On Jan 06, 2015
phpier:
do u wnt us to solve d whole problem or u av a question 2 ask ??

I dont mind if u could solve the whole question but if u can help.me wit a little explanation its ok
Re: Java Programmers Pls Your Help Is Needed by luksybee(m): 3:16pm On Jan 11, 2015
If you can solve this on paper, hook me up on whatsapp with 08030441069
Re: Java Programmers Pls Your Help Is Needed by ThePacific: 7:58am On Jan 15, 2015
What have you done?
Re: Java Programmers Pls Your Help Is Needed by geekmayowa: 4:19pm On Jan 15, 2015
For the first question, you have to first solve and simplify it mathematically
you have two "=" sign in an equation is not right..
after simplification, you can the write the methods with which ever coding notation you want in your own case JAVA.
Re: Java Programmers Pls Your Help Is Needed by nnasino(m): 8:06pm On Jan 16, 2015
Richhommie:
Please can anyone in the house help me with these problems. I would really appreciate it .
Thanks in advance

Methods should be implemented in java

1. Given the functions
f(a,b)=4a - 8b=0
g(x,y)= 9x^2 - 3y=0
,implement a method that resolves
h(x,y,a,b)= 2g(x,y)^f(a,b) (^ means raised to the power)

Show results for 10 different values in a tabular form as shown below

S/n. x. y. a. b. h(x,y,a,b)
1
2
3
4
5
6
7
8
9
10



2. Given that. f(n)=f(n -1)+ f(n - 2)
where f(0)= f(1)= 5.
And n>1; implement a method for evaluating f(n) using recursion.

Question 1
class NairalandSolution {

public static double f(double a, double b){
double result = (4 * a) - (8 *b);
return result;
}

public static double g(double x, double y){
double result = (9 * Math.pow(x, 2)) - (3*y);
return result;
}

public static double h(double x, double y, double a, double b){
double result = 2.0 * Math.pow(g(x,y), f(a,b));
return result;
}

public static void main(String[] args) {
double x,y,a,b;
x = 6; y = 2; a = 6; b = 2;
System.out.printf("S/N.\tx.\ty.\ta.\tb.\th(x,y,a,b)%n"wink;
for(int i = 1; i <= 10; i++){
x += 2; y++; a += 2; b++;
System.out.printf("%d\t%.2f\t%.2f\t%.2f\t%.2f\t%.2f%n", i, x, y, a, b, h(x,y,a,b));
}
}
}


Question 2
class Recursion{
public static int f(int n){
if(n <= 1) return 5;
else return f(n-1) + f(n-2);
}
public static void main(String[] args){
System.out.println("f(9) = " + f(9));
}
}

2 Likes

Re: Java Programmers Pls Your Help Is Needed by Richhommie(m): 8:24pm On Jan 16, 2015
nnasino:


Question 1
class NairalandSolution {

public static double f(double a, double b){
double result = (4 * a) - (8 *b);
return result;
}

public static double g(double x, double y){
double result = (9 * Math.pow(x, 2)) - (3*y);
return result;
}

public static double h(double x, double y, double a, double b){
double result = 2.0 * Math.pow(g(x,y), f(a,b));
return result;
}

public static void main(String[] args) {
double x,y,a,b;
x = 6; y = 2; a = 6; b = 2;
System.out.printf("S/N.\tx.\ty.\ta.\tb.\th(x,y,a,b)%n"wink;
for(int i = 1; i <= 10; i++){
x += 2; y++; a += 2; b++;
System.out.printf("%d\t%.2f\t%.2f\t%.2f\t%.2f\t%.2f%n", i, x, y, a, b, h(x,y,a,b));
}
}
}


Question 2
class Recursion{
public static int f(int n){
if(n <= 1) return 5;
else return f(n-1) + f(n-2);
}
public static void main(String[] args){
System.out.println("f(9) = " + f(9));
}
}


Thanks. wink

1 Like

(1) (Reply)

Django Developer Plz Help / Did You Go Into Coding Because Of Passion Or For The Money Or Both? / I Need A Mobile App Developer Asap!!

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 28
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.