₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,102 members, 8,420,341 topics. Date: Thursday, 04 June 2026 at 04:54 PM

Toggle theme

Java Programmers Pls Your Help Is Needed - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingJava Programmers Pls Your Help Is Needed (1656 Views)

1 Reply (Go Down)

Java Programmers Pls Your Help Is Needed by Richhommie(op):
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(op): 7:29pm On Jan 05, 2015
jaelz:
How much would you pay
10 naira.
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
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 ??
Re: Java Programmers Pls Your Help Is Needed by Richhommie(op): 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));
}
}
Re: Java Programmers Pls Your Help Is Needed by Richhommie(op): 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 Reply

PHP Programmers, Pls Step InProgrammers Pls Help A Beginner!How Long Did It Take You Guys To Become Strong Java Programmers234

Can Someone Learn PHP In Four ContactDownload 18 Python Programming Books For Beginners And VeteransIs Using VPN A Crime?