Java语言程序设计 第九章课后题
文章平均质量分 80
差劲的厉害了
一个正在努力学习的大学生
展开
-
Java语言程序设计 例题9.10(代数:二次方程式)
*9.10 (Algebra: quadratic equations) Design a class named QuadraticEquation for a quadratic equation ax2 + bx + x = 0. The class contains: ■ Private data fields a, b, and c that represent three coefficients. ■ A constructor for the arguments for a, b, and原创 2022-06-13 22:23:04 · 1024 阅读 · 0 评论 -
Java语言程序 例题9.6(秒表)
*9.6 (Stopwatch) Design a class named StopWatch. The class contains: ■ Private data fields startTime and endTime with getter methods. ■ A no-arg constructor that initializes startTime with the current time. ■ A method named start() that resets the startTim原创 2022-06-13 21:44:00 · 1620 阅读 · 0 评论 -
Java语言程序设计 例题9.8(Fan类)
9.8 (The Fan class) Design a class named Fan to represent a fan. The class contains:■ Three constants named SLOW, MEDIUM, and FAST with the values 1, 2, and 3 todenote the fan speed.■ A private int data field named speed that specifies the speed of ...原创 2022-05-23 19:02:26 · 1377 阅读 · 0 评论 -
Java语言程序设计 例题9.7(Account类)
9.7 (The Account class) Design a class named Account that contains:■ A private int data field named id for the account (default 0).■ A private double data field named balance for the account (default 0).■ A private double data field named annualInter...原创 2022-05-23 17:31:13 · 2448 阅读 · 0 评论