📄 team8_project.txt
字号:
/*******************************************************************************
* PROGRAM: Course_Project_Demo.java
* SYNTAX:
* DESCRIPTION: This program is designed for the purpose of
* how to write an Java program to solve the simple
* compuation problems: such as
* 1. summation of N real numbers
* 2. production of Nreal numbers
* 3. calculation of ciecle square
* 4. factorial of a positive integer N
* 5. selection sort of N real numbers
* 6. bubble sort of N real numbers
* 7 insertion sort of N real numbers
* 8 binary search of N ordered real numbers
*
*
* LICENSE:
* ****************************************************
* This program is distributed
* under the standard GPL and is freely useable or
* distributable as long as this license is attached.
* ****************************************************
*
* SPECS: Program's specifications and assumptions here
* PARAMETERS: Uses following parameters:
* - <param_1>: integer, used to determine iterations
* ALGORITHM: Pseudocode describing the algorithm here
* INVARIANT: Class or program invariants (verify state of class) here
* OUTPUT:
* RETURN: Returns return_int code to indicate successful conclusion
*
* AUTHOR(S): Created by Jian Zhang on 2007-03-10
*
*
* MODIFICATIONS:
* Created by Jian Zhang on 2007-03-10
* Modified by TEAM8 on 2007-04-04
* Modified by anwenyi on 2007-04-20
* TODO:
*
***********************************************************************************/
import anwenyi.*;
import weihang.*;
import douwei.*;
import zhoutianyu.*;
import liujing.*;
import jinfeifei.*;
import lvchaoqing.*;
import yangtianfang.*;
import java.io.*;
import java.math.*;
import java.util.*;
import java.awt.*;
import javax.swing.*;
//package team81Project;
public class team8_Project
{
public static void main(String[] args) throws IOException
{
char result;
boolean done = false;
char key;
System.out.print(" \n\n");
JOptionPane.showMessageDialog(null,"Calculate the [S]um of N Real Numbers | Press S [then Enter]\nCalculate the [P]roduct of N Real Numbers | Press P [then Enter]\nCalculate the Square of an [C]ycle | Press C [then Enter]\nCalculate the [F] actorial of Integer N | Press F [then Enter]\nSelection Sor[T]ing of N Real Numbers | Press T [then Enter]\n[B]ubble Sorting of N Real Numbers | Press B [then Enter]\n[I]nsert Sorting of N Real Numbers | Press I [then Enter]\nBinary Search [A]lgorithm | Press A [then Enter]\nGraphic Simple Text [E]ditor | Press E [then Enter]\n\nPress [X] (then Enter) when you want to quit the program\n","TEAM8 Java Course Computing Menu System",JOptionPane.INFORMATION_MESSAGE);
System.out.print(" TEAM8 Java Course Computing Menu System \n\n");
System.out.print("Calculate the [S]um of N Real Numbers | Press S [then Enter]\n");
System.out.print("Calculate the [P]roduct of N Real Numbers | Press P [then Enter]\n");
System.out.print("Calculate the Square of an [C]ycle | Press C [then Enter]\n");
System.out.print("Calculate the [F] actorial of Integer N | Press F [then Enter]\n");
System.out.print("Selection Sor[T]ing of N Real Numbers | Press T [then Enter]\n");
System.out.print("[B]ubble Sorting of N Real Numbers | Press B [then Enter]\n");
System.out.print("[I]nsert Sorting of N Real Numbers | Press I [then Enter]\n");
System.out.print("Binary Search [A]lgorithm | Press A [then Enter]\n");
// System.out.print("Graphic Simple Text [E]ditor | Press E [then Enter]\n\n");
System.out.print("Press [X] (then Enter) when you want to quit the program\n");
do{
key = (char) System.in.read();
if (key == '\n')
key = (char) System.in.read();
switch (key)
{
case 'S':
case 's':
Sum_Computation sum_Computation = new Sum_Computation();
sum_Computation.Input_and_Computation();
sum_Computation.Computation_Result();
break;
case 'P':
case 'p':
Production_Computation prod_Computation = new Production_Computation();
prod_Computation.Input_and_Computation();
prod_Computation.Computation_Result();
break;
case 'C':
case 'c':
Cycle_Square_Computation cycle_Computation = new Cycle_Square_Computation();
cycle_Computation.Input_and_Computation();
cycle_Computation.Computation_Result();
break;
case 'F':
case 'f':
Factorial_Computation factorial_Computation = new Factorial_Computation();
factorial_Computation.Input_and_Computation();
factorial_Computation.Computation_Result();
break;
case 'T':
case 't':
Selection_Sorting select_Computation = new Selection_Sorting();
select_Computation.Input_and_Computation();
select_Computation.Computation_Result();
break;
case 'B':
case 'b':
Bubble_Sorting bubble_Computation = new Bubble_Sorting();
bubble_Computation.Input_and_Computation();
bubble_Computation.Computation_Result();
break;
case 'I':
case 'i':
Insert_Sorting insert_Computation = new Insert_Sorting();
insert_Computation.Input_and_Computation();
insert_Computation.Computation_Result();
break;
case 'A':
case 'a':
Binary_Search binary_Computation = new Binary_Search();
binary_Computation.Input_and_Computation();
break;
// case 'E':
// case 'e':
// new SimpleTextEditor();
// break;
case 'X':
case 'x':
done = true;
break;
default:
break;
}
}while(!done);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -