Question

You have a class that you keep adding to. Whenever you add new functionality, it just...

You have a class that you keep adding to. Whenever you add new functionality, it just seems like the most natural place to put it, but it is starting to become a problem!

What is it called? Why is it bad?

Computer Science

0 0
Add a comment Improve this question Transcribed image text
Answer #1

This leads to a very big class sometimes called Large Class. Following are some of the major issues with Large Class:

  • Hampers the readability of the functionalities in the class
  • Programmers usually find it mentally less taxing to place a new feature in an existing class than to create a new class for the feature.
  • Lot of code duplication, etc.
Add a comment
Know the answer?
Add Answer to:
You have a class that you keep adding to. Whenever you add new functionality, it just...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • This homework involves ADDING MEMBER FUNCTIONS to ArrayBag.h. This homework is important because ...

    This homework involves ADDING MEMBER FUNCTIONS to ArrayBag.h. This homework is important because we do some thing like this on exams. All you will need to submit is your member function code BUT your code should compile and run if I were to add it to ArrayBag.h. That means you should put your code in ArrayBag.h and make sure it compiles before submitting. You should test with a simple main. DO NOT submit main or your ArrayBag.h file just submit...

  • You have a student in your class who started school just before Christmas break. You have...

    You have a student in your class who started school just before Christmas break. You have noticed that no one really includes her or wants to play with her. Last week this student wanted to go to the nurse every day. Each day something new was wrong with her. Lisa was sent home twice last week because she said she was ill. However, Lisa was not sick. She feels excluded and picked on by the rest of the class. You...

  • In Python please. Problem 3 (Tracking Stock Levels) For this third part, you will add functionality to track stock level...

    In Python please. Problem 3 (Tracking Stock Levels) For this third part, you will add functionality to track stock levels within the store and prevent customers from placing orders that cannot be fulfilled. Again, copy your solution from the previous problem into a new file called a2p3.py. Do not overwrite your previous solution, as the TAs will want to see them both. Modify your code by adding a new variable to keep track of the stock level of each product...

  • in C++ creat a DynamicQueue class, add a new data member called count to trace the...

    in C++ creat a DynamicQueue class, add a new data member called count to trace the total number of node you have in current queue (you need to modify some member functions for adding count). Add a member function called displayQueue() to display values stored in each node in the current queue, also the total number of nodes in the queue. You also need to have a driver program (refer to Tester) to test your modified new class and new...

  • 1/3 2/3 3/3 This programming assignment involves adding functionality to the SearchTreeset implementation found in the...

    1/3 2/3 3/3 This programming assignment involves adding functionality to the SearchTreeset implementation found in the SetMap project. Specifically you will edit the file util.SearchTreeSet and write Java-correct implementations of these methods * first pollFirst headset e lower The goal is to make these methods behave exactly like they would for a Java Treeset. Additional programming requirements the first, pollFirst, and lower methods should just take one or two passes down the tree. For a "well-balanced" tree, the time should...

  • ***Program must compile under Ubuntu! (35 pts) Write a C++ program A4p3.cpp with a class that...

    ***Program must compile under Ubuntu! (35 pts) Write a C++ program A4p3.cpp with a class that is a derived class of your class from problem 2. Add a private intmember variable var2 to this class. Initialize the member variables var and var2 with values between 1 and 50 using a constructor that takes two integer parameters. Add a public member function called getsp that should print out the sum and product of var and var2. In your main function, create...

  • You have been asked to create a Dungeon and Dragons style game. They have asked you...

    You have been asked to create a Dungeon and Dragons style game. They have asked you to Design a class called Character that will hold the following information: Name Age Player’s Name Level Gender Race Class (i.e. fighter, wizard) Then create a program that will allow a user to add information into this class and then the program puts the information out. Just to demonstrate the functionality. Note - please keep this program for use later in the course. Your...

  • For this lab, you must define a class called Polynomial. This class definition must include the f...

    Please answer this in python 3, thank you. For this lab, you must define a class called Polynomial. This class definition must include the following methods: ._init_0- the initialiser for the class ._str_0- returns a formatted string representation of a Polynomial object add_term) - adds a new term (coefficient and exponent) to the Polynomial .addo-modifies the existing Polynomial by adding another one to it ._add_0-returns a new Polynomial object that is the sum of two polynomials scale) - scales a...

  • You have made 1.5 L of buffer by adding just acetic acid and no acetate to...

    You have made 1.5 L of buffer by adding just acetic acid and no acetate to a final concentration of 0.300 M. However, you just adjusted the pH of the solution by adding NaOH to a pH of 4.5. The Ka of acetic acid is 1.7*10^-5. What are the new concentrations of acetic acid and acetate?

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT