galera sou iniciante e preciso fazer este programa ai:
Uma empresa de médio porte, necessita elaborar um cadastro dos currículos dos candidatos à possíveis contratações.
Para manter o cadastro, o usuário deve informar as seguintes seções:
? Informações pessoais: Identificação, endereço, contato. (Os dados informados ficam a critério dos integrantes da equipe)
? Formação (cursos, ensino médio, superior)
? Empregos anteriores (empresa, cargo, salário, motivo da saída)
? Área pretendida (no mínimo 5 áreas já pré-cadastradas)
? Salário pretendido
O programa deve possibilitar o cadastro de currículos e uma área administrativa onde será possível aplicar filtros de busca e listar os currículos que se satisfazem os filtros aplicados.
estou com problemas na classe prodPerg onde devo fazer o cadastro de 3 empresas anteriores fiz em matrizes mas nao deu certo
e preciso mostrar todos os dados no menu principal e nao estou conseguindo mostrar todas as classses
valeu!!!!!!
package trabalho;
import javax.swing.JOptionPane;
public class AreaPretend {
public void AreaPretend(){
String areaPretend;
String menu = "1- Programador Jr\n"+
"2- Programador Sênior\n"+
"3- Analista Jr\n"+
"4- Analista Sênior\n"+
"5- Gerente\n\n\n"+
"6- Sair";
int op = Integer.parseInt(JOptionPane.showInputDialog(menu));
{
do{
switch(op){
case 1: areaPretend = "Programador Jr\n";
return;
case 2: areaPretend = "Programador Sênior\n";
return;
case 3: areaPretend = "Analista Jr\n";
return;
case 4: areaPretend = "Analista Sênior\n";
return;
case 5: areaPretend = "Gerente\n\n";
return;
case 6:System.exit(0);
return;
}
}while (op !=6);
}
}
}
package trabalho;
public class Candidato {
protected String nome, endereço, email, cidade, estCivil;
protected int idade;
protected char sexo;
protected float telefone, cel,salPretendido;
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public String getEndereço() {
return endereço;
}
public void setEndereço(String endereço) {
this.endereço = endereço;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getCidade() {
return cidade;
}
public void setCidade(String cidade) {
this.cidade = cidade;
}
public String getEstCivil() {
return estCivil;
}
public void setEstCivil(String estCivil) {
this.estCivil = estCivil;
}
public int getIdade() {
return idade;
}
public void setIdade(int idade) {
this.idade = idade;
}
public char getSexo() {
return sexo;
}
public void setSexo(char sexo) {
this.sexo = sexo;
}
public float getTelefone() {
return telefone;
}
public void setTelefone(float telefone) {
this.telefone = telefone;
}
public float getCel() {
return cel;
}
public void setCel(float cel) {
this.cel = cel;
}
public float getSalPretendido() {
return salPretendido;
}
public void setSalPretendido(float salPretendido) {
this.salPretendido = salPretendido;
}
public Candidato(String nome, String endereço, String email, String cidade,
String estCivil, int idade, char sexo, float telefone, float cel,
float salPretendido) {
this.nome = nome;
this.endereço = endereço;
this.email = email;
this.cidade = cidade;
this.estCivil = estCivil;
this.idade = idade;
this.sexo = sexo;
this.telefone = telefone;
this.cel = cel;
this.salPretendido = salPretendido;
}
public Candidato(){
this("","","","","",0,' ',0,0,0);
}
@Override
public String toString() {
return "Candidato [cel=" + cel + ", cidade=" + cidade + ", email="
+ email + ", endereço=" + endereço + ", estCivil=" + estCivil
+ ", idade=" + idade + ", nome=" + nome + ", salPretendido="
+ salPretendido + ", sexo=" + sexo + ", telefone=" + telefone
+ "]";
}
}
package trabalho;
public class Escolaridade {
protected String ensMedio,ensSuper;
protected byte cursos;
public String getEnsMedio() {
return ensMedio;
}
public void setEnsMedio(String ensMedio) {
this.ensMedio = ensMedio;
}
public String getEnsSuper() {
return ensSuper;
}
public void setEnsSuper(String ensSuper) {
this.ensSuper = ensSuper;
}
public byte getCursos() {
return cursos;
}
public void setCursos(byte cursos) {
this.cursos = cursos;
}
public Escolaridade(String ensMedio, String ensSuper, byte cursos) {
super();
this.ensMedio = ensMedio;
this.ensSuper = ensSuper;
this.cursos = cursos;
}
public Escolaridade(){
this("","", (byte)1);
}
@Override
public String toString() {
return "Escolaridade [cursos=" + cursos + ", ensMedio=" + ensMedio
+ ", ensSuper=" + ensSuper + "]";
}
}
package trabalho;
public class InfoProfissional {
protected String empregoAnt, mtvSaida, cargoAnt;
protected float salarioAnt;
public String getEmpregoAnt() {
return empregoAnt;
}
public void setEmpregoAnt(String empregoAnt) {
this.empregoAnt = empregoAnt;
}
public String getMtvSaida() {
return mtvSaida;
}
public void setMtvSaida(String mtvSaida) {
this.mtvSaida = mtvSaida;
}
public String getCargoAnt() {
return cargoAnt;
}
public void setCargoAnt(String cargoAnt) {
this.cargoAnt = cargoAnt;
}
public float getSalarioAnt() {
return salarioAnt;
}
public void setSalarioAnt(float salarioAnt) {
this.salarioAnt = salarioAnt;
}
public InfoProfissional(String empregoAnt, String mtvSaida,
String cargoAnt, float salarioAnt) {
this.empregoAnt = empregoAnt;
this.mtvSaida = mtvSaida;
this.cargoAnt = cargoAnt;
this.salarioAnt = salarioAnt;
}
public InfoProfissional(){
this("","","",0);
}
@Override
public String toString() {
return "InfoProfissional [cargoAnt=" + cargoAnt + ", empregoAnt="
+ empregoAnt + ", mtvSaida=" + mtvSaida + ", salarioAnt="
+ salarioAnt + "]";
}
}
package trabalho;
import java.util.ArrayList;
import javax.swing.JOptionPane;
public class PergEscola extends Escolaridade {
ArrayList <Escolaridade> lista = new ArrayList<Escolaridade>();
public void PergEscola(){
Escolaridade aux = new Escolaridade(
JOptionPane.showInputDialog("Escola onde concluiu Ens. Médio:"),
(JOptionPane.showInputDialog("Ensino Superior: ")),
(Byte.parseByte(JOptionPane.showInputDialog("Quantidade de Cursos que possui: "))));
lista.add(aux);
return;
}
}
package trabalho;
import java.nio.charset.Charset;
import java.util.ArrayList;
import javax.swing.JOptionPane;
public class PergPessoal extends Pessoal {
ArrayList <Pessoal> lista = new ArrayList<Pessoal>();
public void PergPessoal(){
Pessoal aux = new Pessoal (JOptionPane.showInputDialog("Nome: "),
JOptionPane.showInputDialog("Endereço: "),
JOptionPane.showInputDialog("Cidade: "),
JOptionPane.showInputDialog("Estado Civil: "),
JOptionPane.showInputDialog("Email: "),
Integer.parseInt(JOptionPane.showInputDialog("Idade: ")),
JOptionPane.showInputDialog("sexo: ").charAt(0),
Float.parseFloat(JOptionPane.showInputDialog("Telefone: ")),
Float.parseFloat(JOptionPane.showInputDialog("Celular: ")),
Float.parseFloat(JOptionPane.showInputDialog("Salário Pretendido: ")));
lista.add(aux);
return;
}
}
package trabalho;
public class Pessoal{
protected String nome, endereço, email, cidade, estCivil;
protected int idade;
protected char sexo;
protected float telefone, cel,salPretendido;
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public String getEndereço() {
return endereço;
}
public void setEndereço(String endereço) {
this.endereço = endereço;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getCidade() {
return cidade;
}
public void setCidade(String cidade) {
this.cidade = cidade;
}
public String getEstCivil() {
return estCivil;
}
public void setEstCivil(String estCivil) {
this.estCivil = estCivil;
}
public int getIdade() {
return idade;
}
public void setIdade(int idade) {
this.idade = idade;
}
public char getSexo() {
return sexo;
}
public void setSexo(char sexo) {
this.sexo = sexo;
}
public float getTelefone() {
return telefone;
}
public void setTelefone(float telefone) {
this.telefone = telefone;
}
public float getCel() {
return cel;
}
public void setCel(float cel) {
this.cel = cel;
}
public float getSalPretendido() {
return salPretendido;
}
public void setSalPretendido(float salPretendido) {
this.salPretendido = salPretendido;
}
public Pessoal(){
this("","","","","",0,' ',0,0,0);
}
public Pessoal(String nome, String endereço, String email, String cidade,
String estCivil, int idade, char sexo, float telefone, float cel,
float salPretendido) {
this.nome = nome;
this.endereço = endereço;
this.email = email;
this.cidade = cidade;
this.estCivil = estCivil;
this.idade = idade;
this.sexo = sexo;
this.telefone = telefone;
this.cel = cel;
this.salPretendido = salPretendido;
}
}
package trabalho;
import javax.swing.JOptionPane;
public class ProfiPerg extends InfoProfissional {
String matrizEmp [][] = new String [6][4];
public void InfoProfi(){
JOptionPane.showMessageDialog(null, "Digite 3(Três)Empresas");
int l=0, c=0;
matrizEmp[l][1]= JOptionPane.showInputDialog("Nome da Empresa: ");
l+=1;
matrizEmp[l][1]= JOptionPane.showInputDialog("Emprego Anterior: ");
l+=1;
matrizEmp[l][1]= JOptionPane.showInputDialog("Motivo da Saída: ");
l+=1;
matrizEmp[l][1]= JOptionPane.showInputDialog("Cargo Anterior: ");
l+=1;
matrizEmp[l][1]= JOptionPane.showInputDialog("Salário Anterior: ");
// -------------------------------------------------------------------------------------------
JOptionPane.showMessageDialog(null, "Segunda Empresa ");
matrizEmp[l][2]= JOptionPane.showInputDialog("Nome da Empresa: ");
l+=1;
matrizEmp[l][2]= JOptionPane.showInputDialog("Emprego Anterior: ");
l+=1;
matrizEmp[l][2]= JOptionPane.showInputDialog("Motivo da Saída: ");
l+=1;
matrizEmp[l][2]= JOptionPane.showInputDialog("Cargo Anterior: ");
l+=1;
matrizEmp[l][2]= JOptionPane.showInputDialog("Salário Anterior: ");
// -------------------------------------------------------------------------------------------
JOptionPane.showMessageDialog(null, "Terceira Empresa ");
matrizEmp[l][3]= JOptionPane.showInputDialog("Nome da Empresa: ");
l+=1;
matrizEmp[l][3]= JOptionPane.showInputDialog("Emprego Anterior: ");
l+=1;
matrizEmp[l][3]= JOptionPane.showInputDialog("Motivo da Saída: ");
l+=1;
matrizEmp[l][3]= JOptionPane.showInputDialog("Cargo Anterior: ");
l+=1;
matrizEmp[l][3]= JOptionPane.showInputDialog("Salário Anterior: ");
}
}
package trabalho;
import javax.swing.JOptionPane;
public class Principal {
public static void main(String[] args) {
PergPessoal pP = new PergPessoal();
AreaPretend aP = new AreaPretend();
PergEscola pE = new PergEscola();
ProfiPerg iP = new ProfiPerg();
String menu = "1- Cadastrar Informações pessoais\n"+
"2- Cadastrar Escolaridade\n"+
"3- Cadastrar Profissionalidade\n"+
"4- Selecionar Área Pretendida\n"+
"5- Ver curriculo\n\n"+
"6- Sair";
int op = Integer.parseInt(JOptionPane.showInputDialog(menu));
do{
switch(op){
case 1: pP.PergPessoal();
break;
case 2: pE.PergEscola();
break;
case 3: iP.InfoProfi();
break;
case 4: aP.AreaPretend() ;
break;
case 5: ;
break;
case 6: System.exit(0);
break;
}
op = Integer.parseInt(JOptionPane.showInputDialog(menu));
}while(op!=6);
}
}
package emprego;
import javax.swing.JOptionPane;
import java.util.ArrayList;
public class Mostrar {
Pessoal p = new Pessoal();
Escolaridade es = new Escolaridade();
PergPessoal pP = new PergPessoal();
PergEscola pE = new PergEscola();
public void Mostrar(){
for(int i=0; i< lista.size(); i++)
JOptionPane.showMessageDialog(null,lista.get(i).toString());
}
}