《Java语言程序设计(基础篇)》(第10版梁勇著)第十一章练习题答案.docxVIP

  • 117
  • 0
  • 约1.7万字
  • 约 21页
  • 2021-07-19 发布于天津
  • 举报

《Java语言程序设计(基础篇)》(第10版梁勇著)第十一章练习题答案.docx

} } } } 《 Java 语言程序设计(基础篇) 》 (第 10 版 梁勇 著) 第十一章 练习题答案 11.1 public class Exercise11_01 { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print( Enter three sides: ); double side1 = input.nextDouble(); double side2 = input.nextDouble(); double side3 = input.nextDouble(); Triangle triangle = new Triangle(side1, side2, side3); System.out.print( Enter the color: ); String color = input.nextLine(); triangle.setColor(color); System.out.print( Enter a boolean value for filled: ); boolean filled = input.nextBoolean(); triangle.setFilled(filled); System.out

文档评论(0)

1亿VIP精品文档

相关文档