java语言程序设计基础篇
❶ java语言程序设计基础篇(原书第八版)编程练习题2.17答案!急啊~!明天就要用
public class Exercise2_17 {
// Main method
public static void main(String[] args) {
java.util.Scanner input = new java.util.Scanner(System.in);
// Enter the temperature in Fahrenheit
System.out.print("Enter the temperature in Fahrenheit " +
"(must be between -58癋 and 41癋): ");
double fahrenheit = input.nextDouble();
// Enter the wind speed miles per hour
System.out.print("Enter the wind speed miles per hour " +
"(must be greater than or equal to 2) : ");
double speed = input.nextDouble();
// Compute wind chill index
double windChillIndex = 35.74 + 0.6215 * fahrenheit - 35.75 *
Math.pow(speed, 0.16) + 0.4275 * fahrenheit *
Math.pow(speed, 0.16);
// Display the result
System.out.println("The wind chill index is " + windChillIndex);
}
}
❷ 《Java语言程序设计基础篇》第六版的练习题和编程题答案
哥们我给你写完了,耽误了我半个小时的时间啊!你直接运行就可以了
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Calendar;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
public class Constellation implements ActionListener{
private JFrame frame = null;
private JTextField year = null;
private JTextField month = null;
private JTextField day = null;
private JLabel label1 = null;
private JLabel label2 = null;
private JLabel label3 = null;
private JPanel panel1 = null;
private JPanel panel2 = null;
private JButton button = null;
private JTextField output = null;
public static final String[] zodiacArr = { "猴", "鸡", "狗", "猪", "鼠", "牛", "虎", "兔", "龙", "蛇",
"马", "羊" };
public static final String[] constellationArr = { "水瓶座", "双鱼座", "牡羊座", "金牛座", "双子座", "巨蟹座",
"狮子座", "处女座", "天秤座", "天蝎座", "射手座", "魔羯座" };
public static final int[] constellationEdgeDay = { 20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22,
22 };
/**
* * 根据日期获取生肖 *
* @return 11.
*/
public static String date2Zodica(Calendar time) {
return zodiacArr[time.get(Calendar.YEAR) % 12];
}
/**
* * 根据日期获取星座 *
* @param time *
* @return
*/
public static String date2Constellation(Calendar time) {
int month = time.get(Calendar.MONTH);
int day = time.get(Calendar.DAY_OF_MONTH);
if (day < constellationEdgeDay[month]) {
month = month - 1;
}
if (month >= 0) {
return constellationArr[month];
}
// default to return 魔羯
return constellationArr[11];
}
public Constellation(){
frame = new JFrame("计算生肖,星座");
year = new JTextField("",3);
month = new JTextField("",3);
day = new JTextField("",3);
label1 = new JLabel("请输入年份:");
label2 = new JLabel(",请输入月份:");
label3 = new JLabel(",请输入日期:");
button = new JButton("查看结果");
button.addActionListener(this);
panel1 = new JPanel();
panel1.setLayout(new FlowLayout(FlowLayout.CENTER));
panel1.add(label1);
panel1.add(year);
panel1.add(label2);
panel1.add(month);
panel1.add(label3);
panel1.add(day);
panel1.add(button);
frame.setLayout(new BorderLayout());
frame.add(panel1,BorderLayout.NORTH);
panel2 = new JPanel();
output = new JTextField("",40);
panel2.add(output,JPanel.CENTER_ALIGNMENT);
frame.add(panel2,BorderLayout.CENTER);
frame.setSize(500, 100);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
public void actionPerformed(ActionEvent e) {
output.setText("");
int y = Integer.parseInt(year.getText());
int m = Integer.parseInt(month.getText());
int d = Integer.parseInt(day.getText());
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.YEAR, y);
calendar.set(Calendar.MONTH, m);
calendar.set(Calendar.DAY_OF_MONTH, d);
String zodica = date2Zodica(calendar);
String constellation = date2Constellation(calendar);
String str = "您输入的日期为:"+y+"年-"+m+"-月"+d+"日,得到的生肖:"+zodica+",星座:"+constellation;
output.setText(str);
}
//testcode
public static void main(String[] args) {
new Constellation();
}
}
❸ java语言程序设计基础篇原书第10版这本书怎么样
《Java语言程序来设计(基础篇自 原书第10版)》是Java语言的经典教材,中文版分为基础篇和进阶篇,主要介绍程序设计基础、面向对象编程、GUI程序设计、数据结构和算法、高级Java程序设计等内容。本书以示例讲解解决问题的技巧,提供大量的程序清单,每章配有大量复习题和编程练习题,帮助读者掌握编程技术,并应用所学技术解决实际应用开发中遇到的问题。您手中的这本是其中的基础篇,主要介绍了基本程序设计、语法结构、面向对象程序设计、继承和多态、异常处理和文本I/O、抽象类和接口等内容。本书可作为高等院校程序设计相关专业的基础教材,也可作为Java语言及编程开发爱好者的参考资料。
❹ java语言程序设计基础篇第八版的答案
这个应该是没有的,除非是别人做的。你可以自己做,做不来再发问题问。
❺ java语言程序设计基础篇10.1
外文书名: Introction to Java Programming,Eighth Edition
丛书名: 经典原版书库
ISBN: 9787111361220
条形码: 9787111361220
商品尺寸: 24.2 x 17 x 2.6 cm
商品重量: 930 g
品牌: 机械工业出版社
ASIN: B0067GIPKS
B0067GIPKS
2作者简介编辑
作者:(美)梁
3目录编辑
Chapter 1 Introction to Computers,Programs,and Java
Chapter 2 Elementary Programming
Chapter 3 Selections
Chapter 4 Loops
Chapter 5 Methods
Chapter 6 Single-Dimensional Arrays
Chapter 7 Multidimensional Arrays
Chapter 8 Objects and Classes
Chapter 9 Strings and Text I/O
Chapter 10 Thinking in Objects
Chapter 11 Inheritance and Polymorphism
Chapter 12 Gui Basics
Chapter 13 Exception Handling
Chapter 14 Abstract Classes and Interfaces
Chapter 15 Graphics
Chapter 16 Event-Driven Programming
Chapter 17 Creating Graphical User Interfaces
Chapter 18 Applets and Multimedia
Chapter 19 Binary I/O
Chapter 20 Recursion
Chapter 21 Generics
Chapter 22 Java Collections Framework
Chapter 23 Algorithm Efficiency
Chapter 24 Sorting
Chapter 25 Lists,Stacks,Queues,and Priority Queues
Chapter 26 Binary Search Trees
Chapter 27 Graphs and Applications
Chapter 28 Weighted Graphs and Applications
Chapter 29 Multithreading
Chapter 30 Networking
Chapter 31 Internationalization
Chapter 32 JavaBeans and Bean Events
Chapter 33 Containers,Layout Managers,and Borders
Chapter 34 Menus,Toolbars,and Dialogs
Chapter 35 MVC and Swing Models
Chapter 36 JTable and JTree
Chapter 37 Java Database Programming
Chapter 38 Advanced Java Database Programming
Chapter 39 Servlets
Chapter 40 JavaServer Pages
Chapter 41 JSF and Visual Web Development
Chapter 42 Web Services
Chapter 43 Remote Method Invocation
Chapter 44 Java 2D
Chapter 45 AVL Trees and Splay Trees
Chapter 46 2-4 Trees and B-Trees
Chapter 47 Red-Black Trees
Chapter 48 Hashing
Appendixes
INDEX
希望能够帮助到你,望采纳!
❻ java语言程序设计基础篇(第十版)pdf
❼ 求《java语言程序设计》基础篇第十版配套资料 (主要是学生资源中的补充资料) 其作者是[美]梁勇
网页链接第十版的要登录,这个是第九版的
补上课后习题答案源代码打包
❽ Java语言程序设计:基础篇的目录
Chapter 1 Introction to Computers,Programs,and Java
Chapter 2 Elementary Programming
Chapter 3 Selections
Chapter 4 Loops
Chapter 5 Methods
Chapter 6 Single-Dimensional Arrays
Chapter 7 Multidimensional Arrays
Chapter 8 Objects and Classes
Chapter 9 Strings and Text I/O
Chapter 10 Thinking in Objects
Chapter 11 Inheritance and Polymorphism
Chapter 12 Gui Basics
Chapter 13 Exception Handling
Chapter 14 Abstract Classes and Interfaces
Chapter 15 Graphics
Chapter 16 Event-Driven Programming
Chapter 17 Creating Graphical User Interfaces
Chapter 18 Applets and Multimedia
Chapter 19 Binary I/O
Chapter 20 Recursion
Chapter 21 Generics
Chapter 22 Java Collections Framework
Chapter 23 Algorithm Efficiency
Chapter 24 Sorting
Chapter 25 Lists,Stacks,Queues,and Priority Queues
Chapter 26 Binary Search Trees
Chapter 27 Graphs and Applications
Chapter 28 Weighted Graphs and Applications
Chapter 29 Multithreading
Chapter 30 Networking
Chapter 31 Internationalization
Chapter 32 JavaBeans and Bean Events
Chapter 33 Containers,Layout Managers,and Borders
Chapter 34 Menus,Toolbars,and Dialogs
Chapter 35 MVC and Swing Models
Chapter 36 JTable and JTree
Chapter 37 Java Database Programming
Chapter 38 Advanced Java Database Programming
Chapter 39 Servlets
Chapter 40 JavaServer Pages
Chapter 41 JSF and Visual Web Development
Chapter 42 Web Services
Chapter 43 Remote Method Invocation
Chapter 44 Java 2D
Chapter 45 AVL Trees and Splay Trees
Chapter 46 2-4 Trees and B-Trees
Chapter 47 Red-Black Trees
Chapter 48 Hashing
Appendixes
INDEX
❾ java语言程序设计基础篇(第十版)pdf或word的资源,需要英文版的,谢谢!
基础篇主要讲的是JAVA语言的基本语法、面向对象的程序设计思想以及图形用户界面、网络编程、多线程等技术的基本内容;而进阶篇主要是高级GUI、JA...
❿ Java语言程序设计(基础篇)怎么样
《Java语言程序设计基础篇》(原书第5版本书是Java语言的经典教材,畅销多年不衰。是一本不错的java入门书籍。
本书以J2SE 5.0版本为基础,采用“先讲基础”的教学方式,循序渐进地介绍了程序设计基础、面向对象的程序设计、图形用户界面设计、异常处理和输入/输出等。另外,本书还全面且深入地覆盖了一些高级主题,包括GUI应用程序、applet、数据结构、多线程、JavaBeans、高级GUI、数据库、JSP、分布式计算等。