IntelliJ IDEA Java

FaizLakhani


  • 3 years ago
  • 5
files (3)

file.gitignore

### IntelliJ IDEA ### out/ !**/src/main/**/out/ !**/src/test/**/out/ ### Eclipse ### .apt_generated .classpath .factorypath .project .settings .springBeans .sts4-cache bin/ !**/src/main/**/bin/ !**/src/test/**/bin/ ### NetBeans ### /nbproject/private/ /nbbuild/ /dist/ /nbdist/ /.nb-gradle/ ### VS Code ### .vscode/ ### Mac OS ### .DS_Store

Week6AssignmentInstructions.docx

Week 6's assignment builds upon assignment #2 (so you will need IntelliJ IDEA to complete).

In this week's assignment, you will make change to week 2's project

1) you will create a new class called Employee (see week 4's reading)

public class Employee

{

private int empNum;

}

2) inside Employee...you will create mutator and accessor methods

public void setEmpNum (int emp)

{

empNum = emp;

}

public int getEmpNum()

{

return empNum + 1;

}

3) in the Main class - you will instantiate the Employee class by creating a constructor and passes in a number

Employee someEmployee = new Employee();

someEmployee.setEmpNum( passes in a number);

4) in the Main class - get the number back and print it out w/ your name

// get the number back and print it with your name

System.out.println('Hello, my name is **put your name**  and my employee number is: " + someEmployee.getEmpNum());

Zip the helloworld folder (same as in assignment #1) and submit

HelloWorld2.iml
This file is too large to display.View in new window