Skip to content

Simple example of an application of the strategy design pattern, we implement an "antivirus" πŸ›‘

License

Notifications You must be signed in to change notification settings

ce-box/CE4101-AvastCE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CE4101-AvastCE πŸ›‘

Simple example of an application of the strategy design pattern, we implement an "antivirus" πŸ›‘

Strategy Design Pattern

Problem πŸ“›

One of the dominant strategies of object-oriented design is the "open-closed principle".

Figure demonstrates how this is routinely achieved - encapsulate interface details in a base class, and bury implementation details in derived classes. Clients can then couple themselves to an interface, and not have to experience the upheaval associated with change: no impact when the number of derived classes changes, and no impact when the implementation of a derived class changes.

problem

Structure 🧩

The Interface entity could represent either an abstract base class, or the method signature expectations by the client. In the former case, the inheritance hierarchy represents dynamic polymorphism. In the latter case, the Interface entity represents template code in the client and the inheritance hierarchy represents static polymorphism.

strategy

Example

AvastCE πŸ›‘

For the example of this tutorial we will make a mock of an antivirus. AvastCE antivirus has many types of scans: quick scan, deep scan, file scan and others. Not all scans can be run in the free version, for deep scans you must have a pro account. We will use the Strategy pattern to implement the different types of scans that can be run.

example

Review the implementation of Java code and discover the potential of using the Strategy pattern in the solution of your projects.

Docs πŸ“–

You can find much more about how to use this project in our documentation section

Authors

This project has an excellent development group formed by ITCR computer engineering students

Project developed at the Technological Institute of Costa Rica | 2021 πŸ„―

License πŸ“„

This project is licensed under the MIT License - see the LICENSE.md file for details


About

Simple example of an application of the strategy design pattern, we implement an "antivirus" πŸ›‘

Topics

Resources

License

Stars

Watchers

Forks

Languages