Question: c ) 3 D input file concept: Modify CubePers.java ( page 1 4 6 of the textbook ) , so that it reads in a

c)3D input file concept: Modify CubePers.java (page 146 of the textbook), so that
it reads in a data file "cube.dat" (instead of hardcoding in the program) and
displays the cube in perspective as output. You may run the program by typing
the following: java CubePers cube.dat
Fig. 5.10 Output of program CubePers.java
Fig. 5.11 Vertex numbers
and coordinate axes
// CubePers.java: A cube in perspective.
// Uses: Point2D (Section 1.4), Point3D (Section 3.9).
import java.awt.* ;
import java.awt.event.* ;
public class CubePers extends Frame {
public static void main(String[] args){new CubePers();}
CubePers(){
super("A cube in perspective");
addwindowListener(new WindowAdapter(){
public voidwindowClosing(WindowEvent e){System.exit(0); }
});
Help me please
c ) 3 D input file concept: Modify CubePers.java

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!