Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
Processing - Chapter 6 - Lab processing → chapter 6 → lab Processing & Java: An Introduction to Computing Lab 6: Transition to Java Objectives Students who complete this lab will demonstrate that they can: Implement console-based Java programs using a Java IDE Java Development Environments One advantage of moving to the full Java platform is the availability of more powerful development environments. You will use one of the following for the remainder of your labs and homeworks: Eclipse - Introduction Exercise 6.1 If you haven't already done so, use your Java IDE to do the following: Create a project for your Java-based lab and homework exercises for this course. Create a new package for this lab exercise named edu.calvin.yourLoginID.lab06 . (Be sure to replace yourLoginID with your unique value). Use this package for all the exercises in this lab. Take time now to make sure that you can find the package/directory you just created; you will submit this package/directory in same way that you submitted your work for Processing. You can find a full Java API documentation here: http://docs.oracle.com/javase/7/docs/api/. Console-Based Java Applications All the Processing-based applications in this course have been graphically oriented, but Java also supports command-line or console-based applications that read input that the user types on the keyboard and print their output on the textual console. We will not build many console-based applications, but it’s useful to see how they work. You build a Java program by creating a new Java class with a main() method; you can then run this class as a Java application. To create the class in eclipse, right-click on the package where you want to place the class (in this case, edu.calvin.yourLoginID.lab06 ) and choose "New"-"Class". Exercise 6.2 Use your Java IDE to build a simple, console-based Java application that reads in a person’s name and prints out a friendly welcome. Call your program class Hello . It should implement this, exceedingly simple, algorithm: Prompt for the user’s name. Print a friendly message that includes the user’s name. Here is an example run: Please enter your name: Rembrandt Welcome, Rembrandt! Here, the user typed Rembrandt following the prompt. Save this program using your Java IDE. You’ll find the the file under Eclipse’s src directories under a series of directories in directories that match the package name you gave to the program, as in: yourEclipseRoot/src/edu/calvin/yourLoginId/lab06/Hello.java Checking In Submit the directory lab06 and the code file Hello.java contained within. We will grade this exercise according to the following criteria: Correctness: 80% - Get the program to run in Eclipse (and get it submitted properly). Understandability: 5% - Header Documentation - Document the code’s basic purpose, authors and assignment number. 5% - Code Documentation - Separate the logical blocks of your program with useful comments and white space. User experience (UX): 10% - Treat your user to friendly messages. $Date: 2014-03-17 18:51:20 -0400 (Mon, 17 Mar 2014) $ © 2012 Calvin College