Java程序辅导

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

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
CSC121A Lab 02: The First Java Program CSC121A Lab 02:  The First Java Program   Objectives: §         To get familiar with the use of computer §         To enhance the understanding of BlueJ §         To understand the process of Java program compiling §         To create the first Java program   Requirements:   1.      Create a project named CSC121A-01A in the BlueJ. 2.      Create a class DrawFace in the project 3.       Edit the java source code for the class DrawFace to implement Exercise P1.2, Page 31. In addition to all other requirements, the program should accept one input parameter. 4.      Save the class source code. 5.      Compile the source code in the BlueJ.   6.      Run the byte code in the BlueJ. 7.      Export the source code to a folder named CSC121A-01A. 8.      Compile the source code with javac DrawFace.java command. 9.      Run the byte code with java DrawFace . must be echoed by your program to its output.   Design:   We design a single class: DrawFace.java. This class contains a single method main.   Implementation:   The DrawFace class is implemented as following:   /**    Displays a face with input parameter as the name. */   public class DrawFace {     public static void main(String[] args)     {     String name = args[0];  // receive the parameter from the console         System.out.println("  /////");       System.out.println(" | o o |");       System.out.println("(|  ^  |)");       System.out.println(" | \\_/ |");       System.out.println("  -----");      System.out.println(name);     // display the name under the face    } }   Exercise: 1.      Create a project named CSC121A-01B in the BlueJ. 2.      Create a class DrawChristmasTree in the project 3.       Edit the java source code for the class DrawChristmasTree to implement Exercise P1.3, Page 31. In addition to all other requirements, the program should accept one input parameter. 4.      Save the class source code. 5.      Compile the source code in the BlueJ.   6.      Run the byte code in the BlueJ. 7.      Export the source code to a folder named CSC121A-01B. 8.      Compile the source code with javac DrawChristmas.java command. 9.      Run the byte code with java DrawChristmasTree . must be echoed by your program to its output.   Lab end Quiz: