목록Java/23_1 소프트웨어프로젝트 (7)
archive

We want to construct the Calculator, Calc, Add, Sub, Mul, and Div classes in order for the attached main method to work properly. • Calculator has one Calc field. • The setCalculator method of Calculator takes one parameter and can receive Add, Sub, Mul, and Div objects as parameters. When each object is received, it can be set as the field. • The run method of Calculator receives two integers t..

The Point class and the main method is as follows. Implement the ColorPoint class and the Point3D class so that the following console window can be shown. package April27; public class Point { private int x, y; public Point(int x, int y) { this.x=x; this.y=y; } public int getX() {return x;} public int getY() {return y;} protected void move(int x, int y) { this.x=x; this.y=y; } } package April27;..

1. Develop a simple program of reservation system for a concert. The specification of the system is as follows. • There are three seat types: S type, A type, B type. • The number of seats for each row is fixed to be 16. • There are four menu for reservation system: Reserve, Search, Cancel, Quit • For Reserve menu, only one seat can be reserved for each reservation. The program should receive the..

1.The following code is the main method we want to run, and the following result is the corresponding console output. Declare the Rectangle class for this main method. package April06; public class Project01 { public static void main(String[] args) { // TODO Auto-generated method stub Rectangle r=new Rectangle(2,2,8,7); Rectangle s=new Rectangle(5,5,6,6); Rectangle t=new Rectangle(1,1,10,10); r...

1. We want to manage the scores of 5 students. If the inputs are the name and Korean, English, and mathematics scores for each student, we want to print the two-dimensional table including not only the name and all scores but also the sum and the average for each student adding the two columns. Then we want to add two rows to represent the sum and the average for each subject. Console Input: The..

1. Take no more than 10 integers and put them in an array, and compute the mean and variance of the integers. package March23; import java.util.*; public class Project1 { public static void main(String[] args) { System.out.println("10개의 정수를 입력하세요 >>>"); int[] arr= new int[10]; int sum=0; Scanner input=new Scanner(System.in); for(int i=0;i