Giter Club home page Giter Club logo

LeetCode Stats

saadnoor555's Projects

apriori-agorithm-python icon apriori-agorithm-python

An Effectively Python Implementation of Apriori Algorithm for Finding Frequent sets and Association Rules

design-patter-solid_assignment icon design-patter-solid_assignment

Consider the following specification about a printing management system. PrintMode abstract class contains the following fields - number of pages, page size, orientation, color intensity and cost per page. It also contains the following abstract methods apart from the getter and setter methods - saveToner, savePage and boost. Three classes namely TonerSaveMode, PageSaveMode and BoosterMode extend the PrintMode abstract class. TonerSaveMode additionally contains a field named tonerSavingLevel. In the saveToner method, if tonerSavingLevel is set high, color intensity is reduced by following a well-known standard algorithm. Similarly, if tonerSavingLevel is medium and low, two different algorithms are used to reduce color intensity. In the PageSaveMode, a single algorithm is used to adjust page size and orientation in a way that the number of pages required is reduced. The PageSaveMode contains another method called renderPreview that shows a preview of the updated document. The BoosterMode increases the color intensity up to a maximum acceptable level that is set via its intensityThreshold field. PrintJob class holds a queue of PrintRequest Objects that contains the reference of the Document class and the reference of the TonerSaveMode, PageSaveMode and BoosterMode classes. PrintJob class also holds an object of the PrioritySetting class. The two methods in PrintJob class namely pullJob and changePriority help to send a specific job to production based on the priority setting and change the priority of a job respectively. Now, based on the aforementioned specification, redesign the system so that it abides by the SOLID principles and implement your solution in source code format. You may add, modify and reorganize any of the aforementioned elements in the scenario as needed. However, you cannot delete any element. In your source code, whenever you address a SOLID principle, write which one you have addressed and why as a comment. Also note that, you do not need to implement the actual algorithm to handle print jobs, rather implement a simulated version of it according to the specification.

methods2test icon methods2test

methods2test is a supervised dataset consisting of Test Cases and their corresponding Focal Methods from a set of Java software repositories

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.