Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

bort java.util.Scanner; class DrawTrees public static Scanner scan=new Scanner(System.in); public static void main(String[] args) { int height, segment; char symbol; height=getAttribute(Enter height: ); segment=getAttribute(Enter number

image text in transcribed
bort java.util.Scanner; class DrawTrees public static Scanner scan=new Scanner(System.in); public static void main(String[] args) { int height, segment; char symbol; height=getAttribute("Enter height: "); segment=getAttribute("Enter number of segments: "); symbol=getSymbol ("Enter fill character: "); printTree(height, segment, symbol); } public static int getAttribute(String prompt) { System.out.print(prompt); String Line=scan.nextLine(); return Integer.parseInt(Line); } Trees. Java main.java Messages JGRASP Messages Run 1/0 Interactions -JGRASP exec: javac -g DrawTrees.java DrawTrees.java:14: error: cannot find symbol printDrawTrees(height, segment, symbol); symbol: method printDrawTrees(int, int, char) location: class DrawTrees 1 error ---JGRASP wedge2: exit code for process is 1. ---JGRASP: operation complete. bort java.util.Scanner; class DrawTrees public static Scanner scan=new Scanner(System.in); public static void main(String[] args) { int height, segment; char symbol; height=getAttribute("Enter height: "); segment=getAttribute("Enter number of segments: "); symbol=getSymbol ("Enter fill character: "); printTree(height, segment, symbol); } public static int getAttribute(String prompt) { System.out.print(prompt); String Line=scan.nextLine(); return Integer.parseInt(Line); } Trees. Java main.java Messages JGRASP Messages Run 1/0 Interactions -JGRASP exec: javac -g DrawTrees.java DrawTrees.java:14: error: cannot find symbol printDrawTrees(height, segment, symbol); symbol: method printDrawTrees(int, int, char) location: class DrawTrees 1 error ---JGRASP wedge2: exit code for process is 1. ---JGRASP: operation complete

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions