Medium
Consider this Java class "Product":
public class Product {
private String name;
private String description;
private String category;
private String brand;
private double price;
private int stock;
private String color;
private String size;
private String material;
private String manufacturer;
public Product(String name, String description, String category, String brand, double price, int stock, String color, String size, String material, String manufacturer) {
this.name = name;
this.description = description;
this.category = category;
this.brand = brand;
this.price = price;
this.stock = stock;
this.color = color;
this.size = size;
this.material = material;
this.manufacturer = manufacturer;
}
}
Which of the following solutions, would be the most appropriate to fix this class anti-pattern?
Author: Fritzgy LubinStatus: PublishedQuestion not yet passed
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
0
What is the name of the design pattern that lets you add new operations to objects without changing their class structures?0
What is the name of this software anti-pattern?0
What is the name of the Anti-Pattern that occurs when a single tool or technology is consistently used for various tasks without considering whether it's the best choice?0
What is the name of the anti-pattern when a class becomes overly large and complex?0
What is the design pattern that separates an object's dependencies and provides them from external sources?0
What type of design pattern does the 'Strategy' pattern belong to?0
What is the name of the anti-pattern when outdated code remains in a codebase?