Hi all;
I have some difficalty to write some method in read from file.I write a method of reading from file that contains grades obtained by students in 4 different courses.and this method reads these values and prints the minimum, maximum and average of grades for each student. It should also print the same for all the students. I write the method of printing avarage and also i try to write min and max method but when I compile...
User Profile
Collapse
-
method in read from file
-
Thanks a lot satch and sukatoa for helping ,,,
I will try to solve questions and if I have any question I will post it .... -
Reading file
Hi all,
my java friends ^-^
I have next week quiz in reading file text ,and understand the topic very well.
can any one give some question related to this topic .this help me more to understand
thanks a lot and sorry for inconvenience.. -
about exceptions
I try to this solve this question and I have some problem.Can you please tell where the wrong and explan to me.
package bank;
public class BankAccount {
private double balance;
public BankAccount(dou ble balance) {
this.balance = balance;
}
public double getBalance() {
return balance;
}
public double withdraw(double amount){
balance =... -
Hi Jos,
ok i do like what you mean in these code and when implement in Bluej ,it said that no error ,the problem now how to test it to sure that my code work. tell me if these step is right please
i think i should identify an arr of number then i call Shift right to the that array...Leave a comment:
-
thank you for reply.....
yes like the example above
and the example i have in my question... for shift right
1-3-4-5-6
6-1-3-4-5
and for shift left
1-2-3-4
2-3-4-1
I hope you understand what i mean ^_^Leave a comment:
-
Shift right and left method
Hi all,
I will show you the solution of question , Sometime i have problem in implement the code in BlueJ but i understant what they want frome me in question. this is question
1/ Write a method that takes an array of floats and right shift the numbers one step.
public float ShiftR(float N,float[] arr){
int i = 0;
int j = arr.length -1;
while(i<=j){
int... -
arrays method
Hi All;
tell me please if my steps in solving this problem is right or wrong and if there any mistakes please explain to me ^_^
Write a method that takes an integer N and returns an array of integers of length N. The elements of the array are a randomly generated odd numbers. The signature of the method is as follows
static int[] generateOddRand omArr(int N)
i solve it as follow:
public static int[] generateOddRand omArr(int... -
ArrayList and arrays
Hi,
plese help to understand this question and see if my solution right
Given that a PointXY object is even if the x-coordinate and y-coordinates are even numbers. Write a method in which it takes an array of PointXY and returns the number of even points in the array.
i have orday define PointXY class so i write as follow:
public int evenNo(int[] arr){
int d=0;
for(int i=0;i<arr.lengt h;i++)... -
Thank you very much i understand what you mean and I solve it as follow:
[CODE=java]public static boolean isSorted(int[] arr){
for(int i=0;i<arr.lengt h - 1;i++){
if( arr[i] > arr[i+1] ) return false;
}
return true;
} [/CODE]
and when I compile, it work
Also i solve the second as follow:
[CODE=java]public static void reverse1(int[] arr){
...Leave a comment:
-
Sort method
hi ,
i did Sort class and i did many method for this class such as swap ,min and sortArr. I have difficulty in solve a this static method which is; a method that returns true if the array arr is sorted, otherwise it returns false.
I start like that...
1)
public static boolean isSorted(int[] arr, int i){
for(int i=0;i< arr.length-1;i++){
if ( arr [i]>arr [i++]); return false;
}
... -
thank you very much....sorry but i dont understand what you mean. I will explain to you my problem. when i compile the Date1 class ,it does not compile and her i use (Bluej) and it tell me that day=1; is wrong and the reason is( incompatible types-found (int) but expected GField). i hope that what you mean .and thank you again for your help^_^...Leave a comment:
-
GFilde and Date class
Hi
please tell me the wrong in this code becaus it not compile with me
the question depend in other class that i do it before
and this class her:
public class GField
{
private int value;
private int minimum;
private int maximum;
private int defu;
public GField(int v,int m,int x,int def){
if (v>minimum && v<maximum)... -
CircleXY Class
Hi ,
I try to solve this question, but I have difficulty to solve sub question for this problem
The question is to use the PointXY class that I wrote before to write a class in java that represents the circles in 2 dimensions. A circle can be represented as one point, radius, and color. The name of the class must be: CircleXY. I solve class constructor for this class, I Wrote a getter and a setter method for the each data member , I... -
Recurrence relations
Hi ;
Can someone please explain to me how we get 44 in this question
sum = 0;
grades = [8, 9, 10, 9, 8];
for (i = 0; i < grades.length; i++){
sum = sum + grades[i];}
document.write( sum + "<br>");
the answer will be 44 -
if statment
hi
can any one help me pleaseto understand about if statment because Idid not really understood this topic from teacher and i will have final exam after few day
thank you
No activity results to display
Show More
Leave a comment: