모두 보기

it/programming

[JAVA] 메소드 생성자 사용 League of Legends 상점구현

import java.util.Scanner; class champ { String code, name; int price; champ(String code, String name, int price) { this.code=code; this.name=name; this.price=price; } champ(String code, String name) { this.code=code; this.name=name; this.price=0; } void purchase() { if(this.price==0) System.out.println("이미 구입한 챔피언 입니다."); else { System.out.println(""); switch(this.code) { case "1": System.out.pr..

it/programming

[JAVA] 메소드와 생성자를 이용한 가상 DB 관리

import java.util.Scanner; class Product { String code, name; int price, discount; Product(String code, String name, int price, int discount) { this.code=code; this.name=name; this.price=price; this.discount=discount; } Product(String code, String name, int price) { this.code=code; this.name=name; this.price=price; this.discount=0; } void setDiscount(int discount){this.discount=discount;} int cal..

it/programming

[JAVA] 메소드 함수 사용하기

import java.util.Scanner; class shape { double ban(int a){return a*a*3.14;} int quare(int a, int b){return a*b;} } public class scan { public static void main(String args[]) { Scanner sc = new Scanner(System.in); shape se = new shape(); int a=1, b=1; while(true) { System.out.print("도형을 선택하시오.(1:원, 2:정사각형, 3:종료) : "); int menu = sc.nextInt(); switch(menu) { case 1: System.out.print("원의 반지름을 입력하시오..

hobby/game

lol ! 롤 서버 또 터짐

슈방... 하지만 난 접속중 ㅋ 게임 이용 및 홈페이지 장애 현상에 대한 안내 소환사 여러분. 현재 게임 서버 및 홈페이지에 다음과 같은 현상이 발생하여담당 부서에서 문제를 확인 중에 있습니다. 1. 게임 로그인 불가 현상.2. 서버 장애 현상3. 홈페이지 로딩 지연 현상 정상화되는 즉시 공지사항을 통해 안내해 드리겠습니다. 이용에 불편을 드려 죄송합니다

hobby/camera

NEFUS !

솔닷

hobby/camera

노란 보석

쁘띠석(石)

it/programming

[JAVA] 객체 프로그래밍

import java.util.Scanner; public class goods { String name; int num,price,jaego,panmae; void print() { System.out.println(""); System.out.println("상품"+num+"의 이름 : "+name); System.out.println("상품"+num+"의 가격 : "+price); System.out.println("상품"+num+"의 재고수 : "+jaego); System.out.println("상품"+num+"의 판매수 : "+panmae); } public static void main(String[] args) { goods sang[] = new goods[3]; Scanner input..

반응형
훈솔
'분류 전체보기' 카테고리의 글 목록 (52 Page)