Design a class named DVD that has fields for the DVD category , tittle and price include methods to set and get the value for each field write pseudocode that definnes this class.
Sure! Here's pseudocode that defines the "DVD" class with fields for the DVD category, title, and price, along with methods to set and get the value for each field:
```
class DVD:
category : string
title : string
price : float
method setCategory(newCategory : string):
category = newCategory
method getCategory() -> string:
return category
method setTitle(newTitle : string):
title = newTitle
method getTitle() -> string:
return title
method setPrice(newPrice : float):
price = newPrice
method getPrice() -> float:
return price
```
In this pseudocode, we define a class named "DVD" with three fields: "category", "title", and "price". Each of these fields has a corresponding setter method (setCategory, setTitle, setPrice) to set their value, and a getter method (getCategory, getTitle, getPrice) to retrieve their value.
To use this class, you can create an instance of the DVD class and then use the setter and getter methods to interact with the fields. For example:
```python
// Creating a new DVD instance
myDVD = DVD()
// Setting the values for the fields using the setter methods
myDVD.setCategory("Action")
myDVD.setTitle("Avengers: Endgame")
myDVD.setPrice(19.99)
// Retrieving the values from the fields using the getter methods
categoryValue = myDVD.getCategory()
titleValue = myDVD.getTitle()
priceValue = myDVD.getPrice()
```
By calling the appropriate setter methods, you can set the values for the DVD's category, title, and price. Subsequently, you can retrieve these values by using the corresponding getter methods.