User Tools

Site Tools


dot_class

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dot_class [2022/09/15 09:37] frchrisdot_class [2022/09/15 09:48] (current) – [Dot class] frchris
Line 7: Line 7:
 Extreme programming refers to the wise tradition to write the code that tests your new object before you actually write the new object.  It really does help you define what you need from your new class. Extreme programming refers to the wise tradition to write the code that tests your new object before you actually write the new object.  It really does help you define what you need from your new class.
  
-Here is a [[http://ia800502.us.archive.org/10/items/MakingAJavaClassForDots/Dotclassdemo-Broadband.m4v|link]] to making a Dot class starting with making a tester.  At the time, Applets were a simple way to make a graphics based code, but Applets have since been "deprecated" due to security concerns.  You may wish to fast forward to minute 10:45 to see the beginnings of the Dot class.+Here is a [[http://ia800502.us.archive.org/10/items/MakingAJavaClassForDots/Dotclassdemo-Broadband.m4v|link]] to making a Dot class starting with making a tester.  At the time, Applets were a simple way to write graphics based code, but Applets have since been "deprecated" due to security concerns.  You may wish to fast forward to minute 10:45 to see the beginnings of the Dot class.
  
 Below is a full fledged Graphics application that was based on a generic [[https://mathorama.com/apcs/pmwiki.php?n=Main.MouseListenerApplication| MouseListenerApplication]].  Writing code that is reusable saves a lot of labor and debugging time.   Below is a full fledged Graphics application that was based on a generic [[https://mathorama.com/apcs/pmwiki.php?n=Main.MouseListenerApplication| MouseListenerApplication]].  Writing code that is reusable saves a lot of labor and debugging time.  
Line 146: Line 146:
 } }
 </code> </code>
 +
 +Things to do:
 +  - Write a two parameter constructor
 +  - Write a method that returns a random number that is in the range of ''min'' to ''max''
 +  - Write a method that returns a random Color
 +  - Write a method that will draw itself on a ''Graphic'' object
 +  - Write a ''toString'' method to override the inherited  ''Object'' ''toString()'' method.
 +  - Write overload your constructor a few times
 +
dot_class.txt · Last modified: 2022/09/15 09:48 by frchris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki