hulika

Author Topic: IT Majors Thread  (Read 4045 times)

Offline pao2pao16

  • Philmusicus Addictus
  • *****
IT Majors Thread
« on: December 03, 2006, 07:49:11 PM »
hey guys.. im currently an IT majorsa UA&P.. i just wana share na hirap na hirap na ko sa course ko! haha.. and to think im only 1st year college.. and im currently studying java and computer systems this sem.. aun..
i made this thread para may makatulong naman sakin about my course especially computer languages and hardwares.

i have a computer system na subject. its about harwdwares, software and such.. aun.. tpos bukas may test kami agad about binary numbers and the like. biglaan nga kc 2 meetings plang kami naaaral about that tpos test agad..

aun.. so please.. if you have some experiences to share and some knowledge about my course please feel free to post! haha.. thanks in advance..

Offline panterica

  • Board Moderator
  • *****
Re: IT Majors Thread
« Reply #1 on: January 07, 2007, 02:14:26 PM »
ano ba ang test nyo sa binary numbers? addition, multiplication and division?
I know you would say that at for the record di mo ako kilala ROOKIEBOY. Tinawag kitang rookie at di lahat, IKAW LANG GET IT. Hanggang dyan ka na lang....puro cheap shots - Pallas

"Good artists copy, great artists steal"

Offline pao2pao16

  • Philmusicus Addictus
  • *****
Re: IT Majors Thread
« Reply #2 on: January 07, 2007, 04:27:06 PM »
last year pa po test namin dun. yup! multiplication, addtion tska may hexadecimal pa etc.. halos lahat nga bagsak e at kasama ako dun.. kakaasar tlga. tpos this tuesday may test naman kami sa java programing. baka sir panterica may alam kayo sa java..

Offline slammer2613

  • Philmusicus Noobitus
  • *
Re: IT Majors Thread
« Reply #3 on: February 04, 2007, 05:54:29 PM »
hi wasap! hehe maybe i can help you a little haha:P im a software engr kya lang im not a developer now for work im more with mobile:)  But i finished of course and did the works hahaha:P  c, c++ alot of java haha..assembly, all that logical ekek like binary and operations...hardware..web programming the works tlga haha:P  What lessons are you taking now.  Kya mo yan brad tlgang aralin mo lang unti:P  what lessons are you on now..ill see if i still have material on them:)

Offline pao2pao16

  • Philmusicus Addictus
  • *****
Re: IT Majors Thread
« Reply #4 on: February 04, 2007, 06:01:04 PM »
ei bro.. we are currently studying java now. topic namin is methods. medyo nahihirapan na ko bro. good thing though that i passed my last test sa java. mostly my classmates shifted na because of the test. buti nlng talaga pumasa ako so tinutuloy ko nalang ung course.. but still im confuse parin.. mostly nahihirapan ako sa loops tska sa arrays. hope you can help me bro..


Offline slammer2613

  • Philmusicus Noobitus
  • *
Re: IT Majors Thread
« Reply #5 on: February 05, 2007, 09:07:37 AM »
ahhhh i see hehe..kya yan java is much simpler than other languages.  Mostly because alot of the syntax is easier to follow.  Arrays and loops ba hehe...cge well arrays simple lang yon icipin mo lalagyan lang cia.  Its basically just a storage for whatever you want to put it into.  Il give you an example of loops and arrays here for you to understand. 

Anyways for an array first thing you have to do is declare it.  Meaning it has to exist first.  And im sure in class they've already taught you to declare.  A simple array is like this:

 int[] myArray --> dissecting this it always starts with what kind of array you want to make are you going to store.  You can have different things like string, characters, long, double etc. so always put that first and of course arrays are identified by the [] open closed brackets that goes next.  After that you give it a name.  Now you have to be careful because naming has its rules also.  mostly you may notice its always small caps then largecaps on the secondword so names like myArray or arrayTwo or just one word is fine.  Now some people would declare like this int myArrray[] with the brackets at the end but really thats not the proper way although itl work so just stick to my first example.

Now almost everything in java needs to be declared meaning you recognize it exists.  Next what you need to do is give it memory.  Or like getting a job i hired you but now i have to assign you somewhere.   Thats where the "new" keyword comes in.  after declaration you need to give memory so what would be next is something like this:

int[] myArray = new int[10] -> here i have the basic declaration and memory giving in one.  meaning im creating an array with 10 memory spaces.  Or another way to do this is :

int[] myArray;

myArray = new int[10]; -> this works also, reason for the difference is because later when you get into more programming all the declarations can be made at the very beginning.  So example I hire alot of employees but it doesnt mean you have to assign them yet.  Really depends on how your code goes but anyway will work. 

Now in an array think of parking spaces.  But the count is different when i say 10 spaces im really only counting up until 9 becuase the first space is always 0.  So in this array its like

myArray[0]
myArray[1]
myArray[2]
myArray[3]
myArray[4]
myArray[5]
.
.
myArray[9] so like that.

So now i can start putting things into the array so from what we've learned so far. declare and give it space.

int[] myArray = new int[5];  an integer array with 5 spaces.

Now you can manually assign values to those spaces simply by using the array name and indicating the space so for example :

myArray[0] = 1;
myArray[1] = 3;
myArray[2] = 4;
myArray[3] = 5;
myArray[4] = 6; -> so this is 5 spaces already since remember we start at 0;  So you can try printing this on the console to check by using System.println("number 1 element is " + myArray[4]);

so what should come out is number 1 element is : 6.

So simply thats how an array works :)



Offline slammer2613

  • Philmusicus Noobitus
  • *
Re: IT Majors Thread
« Reply #6 on: February 05, 2007, 09:56:26 AM »
hehe haba noh..pero mas simple explanation ko:)  For loops naman its really just how it is a loop paulit ulit lang hehe :)  Thing is the syntax allows you to control how much it repeats.  Loops save you time becuase it lets you code without typing the same thing over and over again.

For example if i want to pring the numbers 1 to 10.  I can do it the long way by typing println then numbers 1 to 10 using it ten times and ten lines.  But with a loop you can do it in just a few lines.  The basic loop is the for loop.

for(declaration; condition; increment) -> as i said in arrays everything needs to be declared so in a for loop you decide how its declared most common is how many times it will loop so most ppl use an integer.  But the secret with loops is you assign a variable meaning like a letter to the number.  That way you can use it any time.  for example :

for(int i = 1 )(first part) --> meaning im going to start the loop at number 1.  where i represents the number 1 also.

next part is the condition meaning how many times will you loop before you stop so its be like this :

for(int i = 1; i<10)(second part) --> meaning im starting the loop at 1 and until my count is still less than 10 so here it will loop until 9 becuase thats the last possible value i can go to thats less than 10.  Unless the its < meaning less than or equal to i can go up to 10.

lastly is the one that makes the loop work.  If i start at 1 what makes it go to 2? this is where you put the increment.

for( int = 1; i < 10; i++) --> i++ is the java syntax used to denote i = i +1.  its the same.  So remember our i = 1 right so when i say I++ it means after the loop is over add 1 to it so i = 1+1
so when the loop starts again its set to 2 and thats your second loop.  so when its i++ again. i = 2+1
then goes to 3.  gets?:)  Now the beauty of loops.  Il now combine our array lesson and loops together.

remember i can assign values to the array one by one right.  with a loop you can assign the numbers 1-5 for example in simple code. 

class assignArray{

        int[] myArray = new int[5];
    public static void main(string[] args) {

         for(int c = 0; bc <5; c++) { --> i can use different variable names so Ill use C instead hehe
             myArray[c] = c;
             System.println("Count :" + myarray[c]);
             c++:
          }
}
}

Basically what i did was simple.  i created the array right of 5 spaces.  then i made a loop which will count starting from 0 until the the condition is satisfied for until 4 which is the last possible value.  then remember i said you can use variable in different ways since our b = 0  is also like the number 0 itself.  so under the loop saying myArray[c] = c is the same as myArray[0] = 0.  Start seeing the wonder?hehe if used numbers then wala parang andun lang cia pero by using c.  numbers are always changing as b increments so whatever the value of i is at any time so will the other b's in the code.  So after assigning to the array i print it out to see so first count should be Count: 0 and so on.

after remember c++? well in the loop statement that just sets the rules but to increment you have to do it manually.  thats why i put i++ at the bottom meaning after everything is done.  do the add before the loop ends.  so on the next round i will be equal to 1 and the statements myArray[c] = c will now be equal to myArray[1] = 1. :)

the other type of loop is the while loop.  While loops are simpler.  They dont stop while the condition is still true.

example of this is :

class WhileDemo {
     public static void main(String[] args){
          int count = 1;
          while (count < 11) {
               System.out.println("Count is: " + count);
               count++;
          }
     }
}

so here in this example i declared a variable named count and gave it the value of 1.  now i put in a while loop with a condition count <11  so this doesnt stop until the condition is satisfied.  meaning il keep printing count is : 1 all the way til 10 since thats when the condition is satisfied.  You might be asking whats the difference of for and while.  Well maybe youll learn that in class soon hehe pero while loops arent as controlled as for loops are.  while loops can be infinite depending on the condition until you stop it manually.  for loops you set its limit already.

Anyways others might have better comments to help you out pero i hope this small tutorial helps you :)  back to the music forums for now hehehe:)
« Last Edit: February 05, 2007, 11:05:20 AM by slammer2613 »

Offline pao2pao16

  • Philmusicus Addictus
  • *****
Re: IT Majors Thread
« Reply #7 on: February 05, 2007, 11:57:19 AM »
haha.. thanks sir! naiinitidihan ko po lahat ng posts nyo. ang pinoproblema ko is ung mga pinapagawa. kc mostly ung mga tinuturo ng prof ko are really simple. pero pagdating sa mga assgn na pinagagawa nya, napapaisip tlga kaming magkklse. minsan ang hirap isipin kung panu gawin. for example last test namin you have to input your name for example Angel Locsin tpos ang output ay dapat AL.. ung initials lang ung output. at this point hndi tinuro ng prof namin yan or at least hindi nya sinabi kung papanu but at least naituro nya ung loops. kaso ang mahirap is to apply talaga..
during the test, what happend was ang haba ng codes ko. kaso hndi ko nagawa ung initials only. ang nagawa ko lang is the program output the whole name parin. then after ng test nung tinuturo na ng prof namin ung test, ung mga codes nya are sobrang simple. ang hirap po tlga sobra.
« Last Edit: February 05, 2007, 11:59:49 AM by pao2pao16 »

Offline slammer2613

  • Philmusicus Noobitus
  • *
Re: IT Majors Thread
« Reply #8 on: February 05, 2007, 02:33:23 PM »
haha oo i see:) tama mhilig tlga mga prof sa gnyan easy easy lesson tpos saksak sa hirap ang test or hw haha..well its really the same thing puro manipulation..im sure what he did was teach you arrays and loops using easy integers and numbers..baka nagulat kayo kasi ur prof used a string or char test haha:P  advice ko nalng is whenever he teaches you something read up also on the other data types maliban sa numbers ^^ 

The assignment you got mern na pala I/O functions? hehe anyways sa programming you dont have to follow the profs code.  maraming pdeng style dun bsta magwork.  pero of course code ng prof nyo was probably the most efficient hehe..

Another advice in programming syntax is not the problem.  Its never the code thats your problem its always logic and how to do it.  Next time you and your friends can take out a piece of paper, and think of ways to do it knwari.  then get a java reference and check out the different functionalities you can play around with.  lalo na string andami mga functions un.  Do you guys use notepad and compile manually?hehe 

Use JcreatorPro:) its an IDE program for java :) really simple keywords are colored so its easy to see and one button compile and run and it auto fixes all your braces.  Also when you use functions like String then input .(dot) a whole list of functions usually pop out for your use :)  But mainly advice ko really think of the logic first before the code.  And save all your profs exercices and learn from them:) hel prbably be like that the whole term haha.

Offline pao2pao16

  • Philmusicus Addictus
  • *****
Re: IT Majors Thread
« Reply #9 on: February 14, 2007, 07:08:24 PM »
thanks sir! we are using JEdit para sa pagtype ng mga codes.

we will be having our 2nd test this friday. its about methods naman. sana makapasa. actually di ko nagegets ang method ngaun. any advice? tska open notes naman kami e. may alam ba kaung site na pedeng kumuha ng sangkatutak na codes para maging source ko sa test?

Offline chadrhix

  • Veteran Member
  • ****
Re: IT Majors Thread
« Reply #10 on: February 15, 2007, 07:36:09 AM »
thanks sir! we are using JEdit para sa pagtype ng mga codes.

we will be having our 2nd test this friday. its about methods naman. sana makapasa. actually di ko nagegets ang method ngaun. any advice? tska open notes naman kami e. may alam ba kaung site na pedeng kumuha ng sangkatutak na codes para maging source ko sa test?

http://www.planet-source-code.com/

 :mrgreen:
Bonzter= bad deal experience 09232752821
Thisischano = Joybuyer 09175466595 

https://www.facebook.com/CxBags