Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java Debugging Need to Debug Tasks DebugPen.java DebugFour2java 1+ The DebugPen class compiles without >2{ error. private String color; private String point; public DebugPen() {
Java Debugging
Need to Debug
Tasks DebugPen.java DebugFour2java 1+ The DebugPen class compiles without >2{ error. private String color; private String point; public DebugPen() \{ This task is dependent on color = "black"; completing task \#2. point = "fine"; \} public DebugPen(String color, String point) The DebugPen class methods work f. // Thin class uses a DebugPon clans The DebugPen class compiles without >2// to instantiate two Pen objects error. /l One with default valuea /l and the other with user-supplied valuel import java, util, Scanner: 6 public elass DebugFour? This task is dependent on completing task $2. public static void main(String args []) f. Scanner input = new Scanner ( System. in ) : String color: String point: DebugPen pen1; Debugpen pen2; Systemiout,print ("Enter a color ink for the pen >>= ): efror. color = input , noxtline(); System,out,print ("Entor o point bizo - fine, medium, or thick yy "); The DebugFour 2 program accepts user point = input . nextLine(): input and displays the correct output pen1 = new DebugPen(): pen2 = new DobugPen(point, color); System.out,println("Default value pon:"); di pplay (pen1); Systen, out.printin(-User value pen: "); display ( pon22); 7 public otatie void dioplay(FixDobugPen p) \{ System out.println(" The pen has Ink color " + pigetColor ()); System.out.println(" and a " (" pl.getpoint ()+ "posnt."); 3 Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started