Chp7Drive - + "\n\tcalc=" +...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/** * The Chp7Drive class <Driver * for classD and classB outputs * values for diefferent objs> * @author Jeff Cox */ * public class Chp7Drive { public static void main(String[] args) { ClassD first = new ClassD(); ClassD second = new ClassD(10, 13); ClassD third = new ClassD(5, 5, 4, 6); System.out.println("First object\n" + "\tm=" + first.getM() + "\n\tn=" + first.getN() + "\n\tq=" + first.getQ() + "\n\tr=" + first.getR()
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: + &quot;\n\tcalc=&quot; + first.calc()); System.out.println(&quot;Second object\n&quot; + &quot;\tm=&quot; + second.getM() + &quot;\n\tn=&quot; + second.getN() + &quot;\n\tq=&quot; + second.getQ() + &quot;\n\tr=&quot; + second.getR() + &quot;\n\tcalc=&quot; + second.calc()); System.out.println(&quot;Third object\n&quot; + &quot;\tm=&quot; + third.getM() + &quot;\n\tn=&quot; + third.getN() + &quot;\n\tq=&quot; + third.getQ() + &quot;\n\tr=&quot; + third.getR() + &quot;\n\tcalc=&quot; + third.calc()); &quot; } }...
View Full Document

Ask a homework question - tutors are online