Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package hwk5_taylen_schmaltz;
- /**
- *
- * @author tayle_000
- */
- public class DeptName {
- private String department;
- private String location;
- public DeptName(int dptNum) {
- switch (dptNum) {
- case 10010:
- department = "Purchasing";
- location = "Auburn Hills";
- break;
- case 10020:
- department = "Sales";
- location = "Rochester Hills";
- break;
- case 10030:
- department = "Training";
- location = "Auburn Hills";
- break;
- case 20010:
- department = "IT";
- location = "Rochester Hills";
- break;
- case 20015:
- department = "IT";
- location = "Auburn Hills";
- case 20020:
- department = "Operations";
- location = "Auburn Hills";
- break;
- case 20030:
- department = "Engineering";
- location = "Rochester Hills";
- break;
- default:
- department = "Invalid dept. number";
- location = "Invalid dept. number";
- }
- }
- public String getDepartment() {
- return department;
- }
- public String getLocation() {
- return location;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement