인텔리제이 10

JetBrain [Easy] Cinema Room Manager - Stage 5

드디어 마지막 단계인 stage 5. Statistic 프로그램을 만드는 것. 티켓을 팔았으면 좌석중 몇퍼센트를 팔았는지, 수익은 얼마인지 계산을 하는 프로그램인 것 같다. 그리고 잘못된 열과 자리를 입력했을 경우나 이미 팔린 좌석을 예매 하면 에러메세지를 띄워주는 것 까지 ! /** * When the item Statistics is chosen, your program should print the following information: * * The number of purchased tickets; * The number of purchased tickets represented as a percentage. Percentages should be rounded to 2 decimal plac..

JetBrain [Easy] Cinema Room Manager - Stage 4

5개의 필수 코스를 듣고 드디어 stage 4. 메뉴를 만드는 코드이다. 중요한 점은 0.Exit를 누룰 때 까지 계속 메뉴를 선택할 수 있게 해야한다는 점. 티켓을 구매하면 지정 좌석을 "B"로 바꿔줘야 하는 점이 있다. /** * * Show the seats should print the current seating arrangement. The empty seats should be marked with an S symbol, and taken seats are marked with a B symbol. * Buy a ticket should read the seat coordinates from the input and print the ticket price like in the previou..

JetBrain [Easy] Cinema Room Manager - Stage 3

stage 3 문제 시작 ! 필요로 하는 자바 컨셉들 드디어 좌석을 보여줘서 해당 좌석가격을 보여주는 프로그램 단계이다. 해당강의에서는 Array 를 사용해서 문제를 푸는것 같은데 Array 를 안쓰고 문제를 풀었다. import java.util.Scanner; public class Cinema_UserInput { public static void main(String[] args) { final int PRICE_CHEAP = 8; final int PRICE_NORMAL = 10; Scanner sc = new Scanner(System.in); System.out.println("Enter the number of rows:"); int rows = sc.nextInt(); System.out..

JetBrain [Easy] Cinema Room Manager - Stage 2

stage 2 문제 시작 조건 총 좌석수 60 처음부터 반까지는 10달러를 받고 뒷쪽 열은 8달러 홀수 열의 경우 예를 들어 9열 이면 4열까지만10불를 받고, 5열부터 9열까지는 8불을 받는다. 열과 열당 좌석수는 9를 넘어가면 안된다. final int PRICE_CHEAP = 8; final int PRICE_NORMAL = 10; Scanner sc = new Scanner(System.in); System.out.println("Enter the number of rows:"); int row2 =0; //condition 1 : rows lower than 9 do { row2 = sc.nextInt(); }while((row2 9)); System.out.println("Enter the n..

JetBrain [Easy] Simply Chatty Bot 만들기 - Stage 5

드디어 첫번째 프로젝트 마지막 스테이지 ! 이번 task는 문제를 내고 맞히면 축하한다는 메세지를 틀리면 다시 하라는 메세지를 보내는 코드를 작성하는것이다. import java.util.Scanner; class ChatBot { final static Scanner scanner = new Scanner(System.in); // Do not change this line public static void main(String[] args) { greet("Aid", "2018"); // change it as you need remindName(); guessAge(); count(); test(); end(); } static void greet(String assistantName, String..

JetBrain [Easy] Simply Chatty Bot 만들기 - Stage 3

이문제를 풀기 위해 필요한 이론 이번에 작성 할 코드는 나이를 추측하는 로봇을 만드는 것이다. 로봇이 유저의 나이를 3,5,7로 나누었을 때의 나머지를 입력하라고 하고, 이를 이용해 유저의 나이를 계산해서 보여주는 것이다. package bot; import java.util.Scanner; public class SimpleBot { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println("Hello! My name is Aid."); System.out.println("I was created in 2018."); System.out.println("Please, remind..

JetBrain Academy 이용해서 프로젝트 하기

자바를 혼자 공부하면서 항상 내가 공부하고 있는 지식에 대해 확신이 없었던 찰나에 JetBrain Academy 를 발견했다. 일단 아래와 같이 등록과 동시에 일단 7일의 트라이얼이 주어지고 프로젝트 하나를 선택해서 그중 한개의 stage를 마치면 추가 1달 또 1개의 프로젝트를 마치면 추가 1달 해서 총 2달하고 7일의 무료기간이 있다. 자바 뿐만 아니라 파이썬이나 다른 프로젝트들도 있고, 프로젝트에 필요한 이론을 먼저 공부하고 퀴즈를 풀고 코드를 짜는 형식이라서 초보자들에게도 쉽게 자바를 배울 수 있을 거 같아 매우 추천한다. 오늘부터 시작해서 2달동안 여기에 있는 모든 프로젝트를 해서 github 에 푸쉬할 예정이다. 일단 레지스터 페이지에 접속해서 계정을 만들고 시작하면 될 것같다. hypersk..