Skip to content

Design patterns and their implementation in java and c++ programming language.

Notifications You must be signed in to change notification settings

rohit10000/low-level-design

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Low Level Design



Encapsulation

alt text

class Bird { string name, color, gender; public: Bird(string n, string c, string g) { name = n; color = c; gender = g; }

};

int main() {

	Bird b("gauraiya", "brown", "female");
	return 0;
}

The above code has three problem:

  1. Dirty code.
  2. Client have to remember the sequence of parameter.
  3. Backward compatibility.

Problems can be solved using Builder pattern.

Releases

No releases published

Packages

No packages published