當前位置:首頁 » 軟體設計 » java語言程序設計基礎篇

java語言程序設計基礎篇

發布時間: 2021-03-03 20:33:14

❶ 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

logo="https://gss0.bdstatic.com//yun-file-logo/file-logo-6.png" data_number="1" data_sharelink="https://pan..com/s/1Lh1rzXqfxFVY-nV_zGT0Qw">

❼ 求《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、分布式計算等。

熱點內容
美發店認證 發布:2021-03-16 21:43:38 瀏覽:443
物業糾紛原因 發布:2021-03-16 21:42:46 瀏覽:474
全國著名不孕不育醫院 發布:2021-03-16 21:42:24 瀏覽:679
知名明星確診 發布:2021-03-16 21:42:04 瀏覽:14
ipad大專有用嗎 發布:2021-03-16 21:40:58 瀏覽:670
公務員協議班值得嗎 發布:2021-03-16 21:40:00 瀏覽:21
知名書店品牌 發布:2021-03-16 21:39:09 瀏覽:949
q雷授權碼在哪裡買 發布:2021-03-16 21:38:44 瀏覽:852
圖書天貓轉讓 發布:2021-03-16 21:38:26 瀏覽:707
寶寶水杯品牌 發布:2021-03-16 21:35:56 瀏覽:837