• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Coupling and Cohesion

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello ,
Can any one explain me coupling and cohesion properly with any practical exam .

Has-A relation i want to clear properly ? can any one explain this also

thanks in advance
 
Ranch Hand
Posts: 558
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi aneea dhara,


Cohesion: talks about jobs seperation.

1. A class is highly cohesive means its focus is on well modularised task.
- easy to maintain. means any errors come easy to point at where we gone wrong.

2. A class becomes having less cohesiveness means its including somany tasks in its behavior.
- This makes it hard to maintain. Not easy to identify the responsibilities of a class when we need to do some changes.

PERSON HAS-A DOG ( )
class Person{
Dog tommy;
Address address;

Person Has-A address

}
 
Srinivasan thoyyeti
Ranch Hand
Posts: 558
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I have forgotten Coupling

Coupling means the dependancy between classes;

Do we always expect loose coupling between classes;
 
He was expelled for perverse baking experiments. This tiny ad is a model student:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic