I am currently in a programming Logic and design course at my local community college and I was give 5 chapters to read because I join the class late. I am now in 3 and I am confuse with a method that the book does not explain too much. I am stuck at the get and set method. I have read the chapter twice and I cant seem to figure how to use it in a different way from what the book shows.
Here is the example of how the books explains in pseudocode.
public class TestPizza public static void main() pizza large large.setPizzaSize(18) print “A size large pizza is “ large.getPizzaSize() “ inches in diameter” return endclass
I can see that the 18 was already set in the code but the book didnt explains how a user can input the size of the pizza manually. So can some one explain how to use the get and set method or point me to the tutorial? I check the search and only found things about java that didnt explain very well for me to understand.