Which access modifiers you use for each of your data fields


Problem

Part I: Description- Create the class diagram for a class named Pizza as described below.

Data fields for class Pizza include a string field for a topping (such as pepperoni) and numeric fields for diameter in inches (such as 12) and price (such as 13.99). Include methods to get and set values for each of these fields. Make sure to use the correct and complete notation for a class diagram including public and private access specifiers, parameters and return types for methods, etc.

Part II: Description- Which access modifiers did you use (public vs. private) for each of your data fields and each of your methods? Why would a programmer choose to use the access modifiers that you chose for your data fields and for your methods? For full credit, be very specific.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Which access modifiers you use for each of your data fields
Reference No:- TGS03276467

Expected delivery within 24 Hours