Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 478737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:43:19+00:00 2026-05-13T00:43:19+00:00

I have 80-90 classes which are all a type of calculation. But each class

  • 0

I have 80-90 classes which are all a type of calculation. But each class uses one method
compute which is the same in each in class. The items that are different in each class are the
are the instance variables used inside the compute method.

The reason I am looking for a pattern is because what I am doing seems extremely repetitive.Below is an example of just one calc but there can be up to 200 calculations.

Protected Overrides Sub Compute(ByVal cache As Cache.ClientCache(Of System.Guid), _
                                 ByRef objIsTickBoxATicked As IClientAnswer(Of System.Guid))
     Dim objClientAdviceParas As ClientAdviceParagraphs

     'Get the Client Advice Paragraphs
     objClientAdviceParas = GetTickBoxesFromCache(GetAnonymousCache(cache), _
                                                  CType(cache.Client, Client))
     'Return the value
     objIsTickBoxATicked.BoolValue = _
                CheckTickBox(objClientAdviceParas, m_csClientAdviceParaWelfareBenefitsReferral)

End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T00:43:19+00:00Added an answer on May 13, 2026 at 12:43 am

    Perhaps the problem is a misalignment of the problem’s “language” and the programming language. That is, it sounds like you are using an object-oriented approach to solve a functional problem.

    Use a functional language.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following 3 rails classes, which are all stored in one table,
I have a superclass which instantiates my Sql class so all derived classes will
I have a class which depends on 3 classes, all 3 of which have
I have type classes, for all of which I would like to have some
I wish to have a single class which all of my Activity classes extend.
I have various classes which all contain address details, i.e. AddressLine1, AddressLine2, AddressLine3, Suburb,
I have 6 classes, which are all document types. All the document types have
I have some functionality that I need in all my classes which derive from
I have an interface for a variety of classes, all of which should implement
I have a set of classes which are all derived from a common base

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.