Java homework, multiple classes and methods 1

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
7,143
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on May 25, 2009

Superb youtube tutorial link: http://www.youtube.com/watch?v=Hl-zzrqQoSE&feature=PlayList&p=FE2CE09...

PG 126, 3.14, Create a class called Employee that includes three pieces of information as instance variables--a first name (type String), a last name (type String) and a monthly salary (double). Your class should have a constructor that initializes the three instance variables. Provide a set and a get method for each instance variable. If the monthly salary is not positive, set it to 0.0. Write a test application named EmployeeTest that demonstrates class Employee's capabilities. Create two employee objects and display each object's yearly salary. Then give each Employee a 10% raise and display each Employee's yearly salary again.

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (miamimanni)

  • "When I tried to use the lower case version I wasn't able to use it in an if statement" How did you use it? Did you use like if(double1 == doubl2){ } or did you do if(double1.equals(double2)){ } the == just compares memory addresses when you are comparing data types the equals method compares values.

  • I just used the captalized Double.

    Double ==Double

    I don't know how you can use the lower case, another thing you can try is casting it from a double to Double. The syntax would look like this

    (Double)double1variable ==(Double)double2variable.

    I think that could work, let me know

  • I'm not in your class, I'm just some random person :p

  • lol. That's awsome. That's the way it should be man, creating an educational community with in youtube.

    It's like yahoo answers 2.0

see all

All Comments (13)

Sign In or Sign Up now to post a comment!
  • @miamimanni Double is an object, like Integer as opposed to the primitives int and double.

  • Your video is very good , very clear, thank you.

  • double in lower case is a primitive data type 

  • Thanks for your video its really informative..

    can you by change help me in my java course work pls?

  • You are very right... those NewBoston tutorials are excellent for learning Java.

    You did well with this video as well... 

  • OK ManNi I explain you better so I have a program called cojcontroller server - Now! this program work with a version of the game call of juarez 1.0 & I have one video how make run jus type in search cojcontroller

  • @cookieeatbird so can you help me with my problem ? ? ? ???*PLZ

  • @Mr47MasoN47

    Hey, out of luck my friend =/

    I just finished up my associates degree fulfilling my last 2 requirements of astronomy, and biology. The semester before I was doing XML, operating systems, and some other class (nothing to do with programming).

    I'm afraid to say the least that I'm too rusty =/

    Right now I'm trying to re-cap myself on VBA because I got a project to implement at work, and VBA works pretty good with excel.

    Take care my friend and good luck,

    Manni

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more