Home Answers Viewqa Java-Beginners help to write a program for biology to know if two person are related or not

 
 


shereen
help to write a program for biology to know if two person are related or not
1 Answer(s)      2 years and 2 months ago
Posted in : Java Beginners

I wrote the program and i want some help pleas this program check between if they are related or not . i have no problem of reading file and inserted in 2d array but i have wrote program to sum the ones each rows and compared to the second matrix and so that about coulmns , note : two matrix are not equal ! ,, so i will compared the small one with the bigger one so that i use start point and end point , i need only help to write the two method which sum rows and coulmns,

4

**0 0 0 0

1 1 1 1

1 1 0 0

1 1 1 1**

6

0 1 1 1 1 0

0 0 0 0 0 0

1 1 1 1 1 0

1 1 1 0 0 0

1 1 1 1 1 1

1 1 1 1 1 1

my work is

public static void main(String[] args)
{

    try
    {
        Scanner sc = new Scanner(new File("zoo"));
        int caseOne = sc.nextInt();
        int count=0 ;
        while(caseOne>=count)
        {
            //read the first matrix size.
            int length1=sc.nextInt();
            int sum=0;
            System.out.println(length1);
            int[][] m1 = new int[length1][length1];
            // print array in rectangular form
            for (int r=0; r<m1.length; r++)
            {
                for (int c=0; c<m1[r].length; c++)
                {
                    m1[r][c]=sc.nextInt();
                    System.out.print(" " + m1[r][c]);
                }
                System.out.println("");
            }
    // case two
          int length2=sc.nextInt();
            System.out.println(length2);
            int[][] m2 = new int[length2][length2];
            // print array in rectangular form
            for (int r=0; r<m2.length; r++)
            {
                for (int c=0; c<m2[r].length; c++)
                {

                    m2[r][c]=sc.nextInt();
                    {
                    System.out.print(" " + m2[r][c]);
                    }


                }
             for (int a=0; a<m2.length; a++)
            {
                for (int c=0; c<m2[a].length; c++)
                {
                    int startPoint= m2[r][c]-m1[r][c]/2;
                    System.out.print(" " + startPoint);
                    int EndPoint= m2[r][c]-startPoint;
                    System.out.print(" " + EndPoint);
                }
                System.out.println("");

            }

    count++;
        }

    }
    }
    catch (Exception e)
    {
            System.out.println(e);
    }
}


            public static int sumRow( int[][] m1,int startPoint,int ei, int A[])
            {

                return A[i];
            }
            public static int sumcol(int m2[][],int si,int ei, int B[])
            {
                int i=0 ;
                return B[i];

            }

}

View Answers

March 18, 2011 at 3:21 PM


sorry for my weak english









Related Pages:
help to write a program for biology to know if two person are related or not
help to write a program for biology to know if two person are related or not   I wrote the program and i want some help pleas this program check... point and end point , i need only help to write the two method which sum rows
How to implement a superclass Person? - Java Beginners
Person. Make two classes, Student and Lecturer, that inherit from Person. A person has a name and year of birth. A student has a degree program and a lecturer..., write a program name TestQ2 that instantiates an object of each
How to implement this superclass Person - Java Beginners
a superclass Person which it need to Make two classes, Student and Instructor, that inherit...,birthYear=1969],salary=65000.0]''); } } i don't know how to write a coding based on two parameters at the constructor...help me please..  Hi Friend
help
help  please answer these two assignments every one related to each... all possible outputs. Also create two objects for Person class and compare...?? public abstract class Person implements Comparable { private int CivilNumber
help in java program
help in java program  please could you help me with my assignment I have to submit it on Monday 29 October please help me :( Write a program to test the Person class defined below. Your test program should
Related to Project
Related to Project  how speech to text project can be make in java? Please tell me the coding part therapeutically i know i have to use java speech api which offer two technology 1. speech recognization 2. speech syenthesis
Help with this program
Help with this program  Write a program that would do the following: 1) Read two Strings from the user 2) The user should input two integer numbers... the .intValue() method. 4) Add the two integers. 5) Output the result Do the same fir when
Write a program in java...
Write a program in java...  Hi, friends Please, can you help me? Q1: Write a program in java to simulate a calculator. Your program should take two... to enter an integer number. Write a program in java to find the factorial
help
. Based on the above scenario, write a complete Java program. Your program should have two (2) classes namely, Purchase and PurchaseDemo class . Purchase class has
java related - Java Beginners
know where to start from. I have purchased one java related book. But I am... training ?or can it be studied by myself? Please suggest the good book & help me.... The best place for learning Java is "www.roseindia.net" and visit the below two link
help me..
help me..  Design and write a class named Person and its two... constructor for each class. Draw the UML diagram for the classes. Write a test program.... A person has a name, address, phone number and email address. A student has
related to java
related to java  what is mean of }); in java.i know that } is used to close a block of statement,) is used to close a statement and ";"is used after... program,plz send correct and simple answer
Help with Temperature program
Help with Temperature program  I need help to write a GUI program to calculate the temperature. and here is the format Application that converts...¢ The application should allow the user to make conversions between any two scales. Ã
Help me to write this simple java frame program
Help me to write this simple java frame program   I want to write a Java program for.... To create a frame with 4 text fields;name,street,city and pin;with suitable labels. Also add a button "OK". After enter values
please help me to write a code for this program
please help me to write a code for this program   1 1 1 1 2 2 1 1 3 4 3 1 1 4 7 7 4 1
please help me to write a code for this program
please help me to write a code for this program   1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
write a program which asks the user for two int values and calculates their sum.
write a program which asks the user for two int values and calculates their sum.  The title says it all, an example is (1,2) > 3
Help with this program
Help with this program  Write a program that would do the following: 1) Read a String from the user. The String will be the following: "My grade is x" (where x is an integer between 0-9) 2) Get the String to integer by creating
Write an event driven program to perform the arithmetic operations as shown in the interface
Write an event driven program to perform the arithmetic operations as shown in the interface  hi sir i have an assignment question, but i don't know the java programming code for that question. my question is here: Q. Write
help in java
help in java   Team Roster Create a program called TeamRoster..., then you have N/12 dozen eggs, with N%12 eggs left. Write a program that asks... addTeamMember() to append a new member to your roster string. After creating two rosters
Write a C language program to read two matrices and multiply them?
Write a C language program to read two matrices and multiply them?  Write a C language program to read two matrices and multiply them?   Here is an example of multiplying two matrices using C language. #include <
baaank acoounts related - Java Beginners
but that is not working kindly help me send me a working code as i a am totally new to java Assume that the bank maintains two kinds of accounts for its customers, one..., a service charge is imposed. In this program student is expected to create 3
how to write this program
or numerical grade. You will be submitting TWO versions of this program. Write one...how to write this program  Write a program in java which calculates...?¢s GPA. This program should take a studentââ?¬â?¢s First Name, Last Name a GPA
Server Related exception
Server Related exception  How will write code to handle serverside exceptions in our projects.Earlier we dont know which exception the code will throw
please any one can help me to write a code for this question?
please any one can help me to write a code for this question?  Q 1) In a class first day 25 students are joined. After two days that total students will increased to 60. We can develop a program by using ArrayList concept
intersection of two java arrays
of the correct size. I know how to copy the two arrays into the third array but am... use set collections with the program either. Any help on the direction to go...intersection of two java arrays  I am trying to figure out how
compile this program and let me know the resolution
compile this program and let me know the resolution  class Maxof2...+" is greater than "+i); } } please compile and let me know the resolution   Hello Friend, After compiling the code, while running the code, specify two
Help
Help  write a program that reads an integer and check whether it is even. for example, if your input is 25, the should be: is 25 an even number? false if your input is 2000, the should be: is 2000 an even number?true
server with two port - Java Server Faces Questions
server with two port  Hello, want to write two port server socket program using Java, (i.e. single server program which is listening on two ports (say 3122 and 3133) simultaneously. In this program when two different clients
Two compilation errors.Can anyone help soon. - Java Beginners
Two compilation errors.Can anyone help soon.  a program called.... The Date object should always remain in a consistent state. Write a program... year. My program:- package datejavaapp; /** * * @author TKS
problem in swing program for opening two windows with same login credentials
problem in swing program for opening two windows with same login credentials  I Face two problems while writing the code in swing program 1.i... username,password two times it opens only one time 2.i write code for tree node
referring to question Person.. - Java Beginners
referring to question Person..  Hi!firstly i want to thank to someone who always answer my questions, i really appreciate it..emm may i know what...=gender; this is base on previous question (Person)..can u explain to me
Write a program to list all even numbers between two numbers
Write a program to list all even numbers between two numbers... Numbers Example in Java: Here you will learn to write a program for listing out all the even numbers between two numbers. For this first create a class named
related to multiple thread....!!!!
related to multiple thread....!!!!  Write a Java program, which creates a linklist for Employees info viz. EmpID, EmpName, EmpAge. All operations... write its Content in a file, it will be only performed when application exits
plz help me out with this problem...please write the program for me.thanxxxxx
plz help me out with this problem...please write the program for me.thanxxxxx  Write a program that will print out a hydro bill. The bill will be formatted as the example on the next page. The following information
plz help me out with this problem...please write the program for me.thanxxxxx
plz help me out with this problem...please write the program for me.thanxxxxx  Write a program that will print out a hydro bill. The bill will be formatted as the example on the next page. The following information
tow method to read and write .
tow method to read and write .  i have two method , frist named "readString" which has no input ,and output b type string ,. second method named... solution this program ....help me please
please help me for this program - Java Beginners
please help me for this program   Write a program that asks the user for a starting value and an ending value and then writes all the integers (inclusive) between those two values. Enter Start: 10 Enter End: 14 10
JDBC ODBC related problem
JDBC ODBC related problem  i WANT HELP RELATED TO JDBC CONNECTIVITY.....MEANS FROM THAT I COME TO KNOW THAT WHICH CUSTOMER HAVING WHICH PAPER........... HELP ME PLZ THANKS IN ADVANCED
need help creating a lift program - Java Beginners
need help creating a lift program  Classes, Methods, Constructors please i need help to create an elevator program Simulating an Elevator write an Elevator class containing various methods. Then, write a program
Related to weblogic server8.1
Related to weblogic server8.1  hi Everybody, i have write a simple servlet program and deploy on weblogic8.1 server. when I'm running this app. when I'm testing this app. this error is occurred. Error 500--Internal Server Error
Related to multiple inhetitance - Java Beginners
Related to multiple inhetitance  Sir, Plz help me to solve this question. Q.1. Write a Progarm to illustrate the concept of multiple inheritance using interface
multithreaded program help!!!!
multithreaded program help!!!!  Write a multithreaded program that calculates various statistical values for a list of numbers. This program... value. For example, suppose your program is passed the integers 90 81 78 95 79
really need help on how to write this program plz some 1 help out. - Java Beginners
really need help on how to write this program plz some 1 help out.  i am confused here on what to write can some 1 help out here i dont quite understand how to code it so can some 1 help out. Part II Write, compile and execute
to write a program to display the employee details..
to write a program to display the employee details..  To dipslay... running this program the new window has to be opened asking us to enter all...   not this one actually i wnat a very small program that displays all
need help with java program as soon as possible
need help with java program as soon as possible  So my assignment is to write a program that used while loops to perform 6 different things. 1. prompt the users to input two integers: firstNum and secondNum (firstNum must be less
Java Related Question
Java synchronized method  Dear Friend, I have written below program for synchronized method in java but it's not working plz help me. program class SynchronizedModel extends Thread { static String msg[]={"Welcome
Java Related Question
Java synchronized method  Hi, I have written below program for synchronized method in java but it is not working please help me. program class SynchronizedModel extends Thread { static String msg[]={"Welcome","mangal
Need help with console program?
Need help with console program?  Write a console program that repeatedly prompts the user to enter data until they type done (any case, Upper, Lower, or Mixed). thanks in advance.   Here is an example that repeatedly
Need in desperate help in writing a console program
Need in desperate help in writing a console program  Write a console program that repeatedly prompts the user to enter data until they type done (any case, Upper, Lower, or Mixed). As they enter the data, assign it to a two

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.