Prime Factorization Implementation

  • Uploaded by: Newton Campbell
  • 0
  • 0
  • August 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Prime Factorization Implementation as PDF for free.

More details

  • Words: 172
  • Pages: 1
Newton Campbell February 1, 2006 In order to implement this program using the State Pattern, I will need five classes. The first class is obviously a main or initialization class. Another class will be the PrimeFactor class. This class will be inherited by three other primary factor classes. These classes will have their own individual methods to find a prime factorization. In order to implement this program using the Strategy pattern, something very similar must be done. There will still be an initialization or main class and a PrimeFactor class. There will also be a FactorMethod class. This class will be inherited by three other classes. The purpose of these series of classes is to give the PrimeFactor class an option of three different methods to use in order to calculate the PrimeFactorization. It is a little much to create all these different classes for such a small problem, especially when it comes to using the Strategy pattern. But that is what relates to the three piece puzzle program in this assignment.

Related Documents


More Documents from ""

Pop3d
August 2019 19
Prospectus
August 2019 48
Poetry Reflection
August 2019 27
Police
August 2019 42