Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple repository with code using Singleton Pattern in Java and C#

This project explores some key concepts of Oriented Object Programming:

  • Classes.
  • Object.
  • Abstraction: Show their benefit instead of regular classes.
  • Inheritance: Show the proper way to handle that and avoid complexity (Even inside the class and when managing the Database).
  • Encapsulation: The Power of Abstract Classes and Interfaces.
  • Abstract Class: With sample Code in Java and C#.
  • Interface: With sample Code in Java and C#.

Task to be performed before executing the code:

###$ Java Programming Language

  • The used IDE is Eclipse IDE for Enterprise Java Developers. Version: 2019-09 R (4.13.0), but the same project could also work with NetBeans or another IDE.
  • The two drivers jar files (For MySQL and for SQLServer): Inside Java/drivers folder.
  • Then Test each code's package separately.

C# Programming language

  • The used IDE is Visual Studio 2015 with the target .Net 4.0 for each project.
  • The proper dll file that supports MySQL Database should be downloaded and linked as a reference for the corresponding Console Project or Class Library Project.
  • The Main project SingletonLibrary should allow other projects to run properly.
  • Each project should be tested with the corresponding Console Project to see their respective output result.
  • The default startup project should be changed to test each scenario.
  • The Database Script for both SQL Server and MySQL is available inside the database folder (Inside the Java root folder).

The output

The output should look like this screenshot (For Java or C#):

  1. Database Connection.

    img2

  2. Data inserted using Abstract class.

    img1

  3. Data inserted using Interface.

    img3

About

A simple repository with code using Singleton Pattern in Java and C#

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages