# 연봉지출 계산
## 문제
개발자 연봉총합을 구하시오.
## 상세조건
+ 클래스다이어그램과 뼈대코드를 참조 할 것.
+ 회사는 이름과 여러명의 개발자를 갖는다.
+ 개발자의 연봉은 salary() 메소드를 통해 구할 수 있다.
## 클래스 다이어그램

## 뼈대코드
```
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
// 회사 객체 생성
JavaCorperation corp = new JavaCorperation("클라우드스터딩");
// 연봉지출 출력
System.out.println("연봉지출: " + corp.salaryExpenses());
}
}
class JavaCorperation {
// 필드
private String name;
private ArrayList<Developer> devs;
// 생성자
public JavaCorperation(String name) {
this.name = name;
this.devs = new ArrayList<Developer>();
this.devs.add(new Developer("진우", 4));
this.devs.add(new Developer("두호", 1));
this.devs.add(new Developer("윤석", 5));
this.devs.add(new Developer("승주", 2));
this.devs.add(new Developer("세홍", 10));
}
// 연봉지출
public int salaryExpenses() {
/* 1. 개발자 연봉 총합을 반환하시오. */
return 0;
}
}
class Developer {
// 클래스 변수
public static final int JUNIOR = 2800;
public static final int INTERMEDIATE = 3500;
public static final int SENIOR = 4500;
// 필드
private String name;
private int career;
// 생성자
Developer(String name, int career) {
this.name = name;
this.career = career;
}
// 레벨
public int level(int career) {
if (career >= 0 && career < 3)
return JUNIOR;
else if (career >= 3 && career < 7)
return INTERMEDIATE;
else if (career >= 7)
return SENIOR;
else
return 0;
}
// 연봉
public int salary() {
return level(this.career) + 100 * this.career;
}
}
```
## 출력 예
```
19300
```