
It can be helpful to have some code in your back-pocket! This back-pocket code shows a Java class for a Dog with (1) an instance variable myAge, (2) a constructor that takes in an int for the initial age of the Dog, (3) a method getOlder() to increment the age of the Dog, (4) a method toString() to return a String that says the Dog's age, and (5) a main method that creates a Dog object, calls getOlder() and prints the Dog. At Harvey Mudd College, we have students memorize a few pieces of "back-pocket code" - Check it out here: tinyurl.com/quizBPC
Back-pocket code: Basic Java class - YouTube |
2 Likes | 2 Dislikes |
382 views views | 2,205 followers |
Education | Upload TimePublished on 23 Jan 2017 |
\u200fyoutube,\u200ffortnite,\u200fgoogle translate,\u200f\u202bgoogle\u202c,\u200fminecraft,\u200fok google,\u200fpubg,\u200fsiri,\u200fجمعة مباركة,\u200fصباح الخير,\u200fطيور الجنة,\u200fسورة البقرة,\u200fقران,\u200fسورة الكهف,\u200ftwitter,\u200finstagram,\u200fدعاء السفر,\u200ffacebook,\u200fشباب البومب,\u200fhttps //ios.snapp.ir
Không có nhận xét nào:
Đăng nhận xét