Question: Exercise 1 4 - 1 Modify the Product Manager application In this exercise, you will modify and enhance the Product Manager application described in this

Exercise 14-1 Modify the Product Manager application
In this exercise, you will modify and enhance the Product Manager application described in this chapter. In addition, you will modify and enhance the Product Catalog application that uses the same model as the Product Manager application.
Open and test the application
1. Run the application that's stored in the ex_starts/ch14_exl directury.
2. Test this application by adding and deleting a product.
3. Open the product_manager/index.php file for this application and review the code. Then, open the model/category.php and model/prodact.php files for this application and review the code.
Use set methods to set data in the objects
4. Modify the constructor for the Category class so it has zero parameters and sets the properties to default values. For this to work, you will need to code the properties explicitly and include type declarations.
5. Modify all code in the application that creates a Category object so it uses the set methods to set the data in the object.
6. Modify the constructor for the Product class so it has zero parameters and sets all properties to default values. Just as you did for the Category class, you will noed to code all the properties explicitly for this to work. In addition, to assign a null value to the category property, you will need to define the property as mullable.
7. Modify all code in the application that creates a Product object so it uses the set methods to set the data in the object.
8. Test this application by adding and deleting a product.
Use regular methods instead of static methods
9. Modify the CategoryDB class so it uses regular methods instead of static methods.
10. Modify all code that uses the CategoryDB class so it creates a CategoryDB object and calls regular methods from that object.
11. Modify the ProductDB class so it uses regular methods instead of static methods.
12. Modify all code that uses the ProductDB class so it creates a ProductDB object and calls regular methods from that object.
13. Test this application by abling and deleting a product.
Modify the Product Catalog application
14. Open the product_cataloglindex.php file for this application and review its code.
15. Modify all of this code so it works correctly with the new model.
16. Test this application by viewing at least one product in each category.
Using Murach's PHP and MySQL (4th Edition)
A screenshot of the solution of the practice assignment, thank you :)
Exercise 1 4 - 1 Modify the Product Manager

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!