Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Matilda Hughes   on May 16 In Java Category.

  
Question Answered By: Hababah Younis   on May 16

I was watching this thread slightly and it breaks my heart when I see this.
Have you heard of OOP ever?

What about creating objects  (classes) that reflects your entities?

Working with arrays  in this way is definitely not OOP. Are you guys
switching over from C? At least it looks like someone is porting
C to Java.

public class Month {

private int numberOfDays;
private String name;

public Month(String name,int numberOfDays) {
this.name = name;
this.numberOfDays = numberOfDays;
}

getter and setter ommited for bravity
}

and so on and so on and so on

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 


Tagged: