January 2014
Intermediate to advanced
736 pages
70h 43m
English
This app consists of four classes:
• Line (Fig. 6.4)
1 // Line.java 2 // Class Line represents a line with two endpoints. 3 package com.deitel.cannongame; 4 5 import android.graphics.Point; 6 7 public class Line 8 { 9 public Point start = new Point(); // start Point--(0,0) by default10 public Point end = new Point(); // end Point--(0,0) by default 11 } // end class Line
Fig. 6.4 | Class Line represents a line with two endpoints.
• MainActivity (the Activity subclass; Section 6.6)
• CannonGameFragment (Section 6.7), and
• CannonView (Section 6.8)
In this section, we discuss class Line, which represents a line’s starting and ending Point ...
Read now
Unlock full access