Dankwansere's Profile User Rating: -----

Reputation: 69 Whiz
Group:
Active Members
Active Posts:
221 (0.11 per day)
Joined:
09-November 09
Profile Views:
6,341
Last Active:
User is offline Today, 09:55 AM
Currently:
Offline

Previous Fields

Country:
CA
OS Preference:
Linux
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
Playstation
Your Car:
Infiniti
Dream Kudos:
0

Latest Visitors

Icon   Dankwansere has not set their status

Posts I've Made

  1. In Topic: *** Subtraction tool with java ***

    Posted 23 Feb 2015

    1. You can create 2 variables, and assign them random integers.
    2. compare the 2 variables with an if function to make sure number 1 is >= greater than number 2
    3. System.out.print to output the question to student
    4. have a variable that will take the user's input.
    5. calculate to see if the user answer is correct.

    Show us what code you have so far, and we can go from there.
  2. In Topic: Couple question about using arrays for keeping student grades

    Posted 23 Feb 2015

    The array gets initialized before you call the .setStudents(#) method. there are few ways to accomplish what you want. You can create a getter and setter for the array, like how you have it for setStudents, or you can re-initialize the array in the setStudents() method

    public void setStudents(int students)
     {
      this.numOfStudents=students;
      this.studentGrades = new int[numOfStudents];
     }
    
    
    


    Using a setter
    public void setStudentGrades(int students)
     {
      this.studentGrades = new int[numOfStudents];
     }
    
    
    
  3. In Topic: Couple question about using arrays for keeping student grades

    Posted 22 Feb 2015

    For the 1st Question, you receive an error when you put numOfStudents, because you haven't initialized the numOfStudents variable. When you initialize it and assign it the correct integer(eg. 10), the error will go away.

    As for Question #2.I tested running the client class, and I received different output for each arary. output result below
    Num of getStudents: 10
    Num of getStudents: 10
    Number of Students: 10
    Number of Students: 10
    false
    false
    [3, 7, 22, 93, 67, 45, 59, 12, 15, 44]
    [83, 43, 79, 77, 89, 0, 48, 27, 14, 61]
    [3, 7, 12, 15, 22, 44, 45, 59, 67, 93]
    [0, 14, 27, 43, 48, 61, 77, 79, 83, 89]
    The highest grade1 in the array is: 93
    The highest grade2 in the array is: 89
    The average grade1 is: 36.7
    The average grade2 is: 52.1
    The median grade1 is: 22
    The median grade2 is: 48
    The mode grade1 is: 93
    The mode grade2 is: 89

    For question 3:
    An easier way to compare arrays is to use the "Arrays.equals()" method

    here's an example

    import java.util.Arrays;
    class Test
    {
        public static void main (String[] args)
        {
            int arr1[] = {1, 2, 3};
            int arr2[] = {1, 2, 3};
            if (Arrays.equals(arr1, arr2))
                System.out.println("Same");
            else
                System.out.println("Not same");
        }
    }
    
    
    

    Output: Same
  4. In Topic: Thread vs Task on .Net framework 4.0

    Posted 20 Feb 2015

    Thank you for the references. will investigate :)
  5. In Topic: Thread vs Task on .Net framework 4.0

    Posted 19 Feb 2015

    Thanks, I've actually brought this idea to my manager, so we will be replacing our current application that uses MS.Interop to openxml very soon. Just a quick question though. The Ms.Interop.Word has alot of functionalities like updating custom fields programmatically, inserting images to a specific place on a document programatically(Shape) and many more. I did some research on openXML and I discovered that it also has a lot of those functionalities, but I didn't quite find anything for openxml inserting an image to a specific place on a document.

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Years Programming:
6
Programming Languages:
Java, C#, C, Unix, HTML, Xhtml, PHP

Contact Information

E-mail:
Click here to e-mail me
Facebook:
http://www.facebook.com/profile.php?id=509694751

Friends

Comments

Dankwansere has no profile comments yet. Why not say hello?