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 lab9;
- /**
- *
- * @author Student
- */
- public class FrameExample2 extends javax.swing.JFrame {
- /**
- * Creates new form FrameExample2
- */
- public FrameExample2() {
- initComponents();
- myInitComponents();
- }
- public void myInitComponents(){
- jCheckBox2.setText("Second option");
- jCheckBox3.setText("Third option");
- jCheckBox4.setText("None of the above");
- jLabel1.setText("Username");
- jLabel2.setText("Password");
- //jPasswordField1.setText("");
- }
- /**
- * This method is called from within the constructor to initialize the form.
- * WARNING: Do NOT modify this code. The content of this method is always
- * regenerated by the Form Editor.
- */
- @SuppressWarnings("unchecked")
- // <editor-fold defaultstate="collapsed" desc="Generated Code">
- private void initComponents() {
- jCheckBox1 = new javax.swing.JCheckBox();
- jCheckBox2 = new javax.swing.JCheckBox();
- jCheckBox3 = new javax.swing.JCheckBox();
- jCheckBox4 = new javax.swing.JCheckBox();
- jPanel1 = new javax.swing.JPanel();
- jLabel1 = new javax.swing.JLabel();
- jLabel2 = new javax.swing.JLabel();
- jTextField1 = new javax.swing.JTextField();
- jPasswordField1 = new javax.swing.JPasswordField();
- jButton1 = new javax.swing.JButton();
- setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
- jCheckBox1.setLabel("FirstOption");
- jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jCheckBox1ActionPerformed(evt);
- }
- });
- jCheckBox2.setText("jCheckBox2");
- jCheckBox2.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jCheckBox2ActionPerformed(evt);
- }
- });
- jCheckBox3.setText("jCheckBox3");
- jCheckBox3.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jCheckBox3ActionPerformed(evt);
- }
- });
- jCheckBox4.setText("jCheckBox4");
- jCheckBox4.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jCheckBox4ActionPerformed(evt);
- }
- });
- jLabel1.setText("Username");
- jLabel2.setText("jLabel2");
- jTextField1.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jTextField1ActionPerformed(evt);
- }
- });
- jPasswordField1.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jPasswordField1ActionPerformed(evt);
- }
- });
- jButton1.setText("Login");
- jButton1.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jButton1ActionPerformed(evt);
- }
- });
- javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
- jPanel1.setLayout(jPanel1Layout);
- jPanel1Layout.setHorizontalGroup(
- jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(jPanel1Layout.createSequentialGroup()
- .addGap(23, 23, 23)
- .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jLabel2)
- .addComponent(jLabel1))
- .addGap(24, 24, 24)
- .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jTextField1)
- .addComponent(jPasswordField1))
- .addContainerGap())
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
- .addContainerGap(73, Short.MAX_VALUE)
- .addComponent(jButton1)
- .addGap(66, 66, 66))
- );
- jPanel1Layout.setVerticalGroup(
- jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(jPanel1Layout.createSequentialGroup()
- .addGap(27, 27, 27)
- .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
- .addComponent(jLabel1)
- .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(jLabel2)
- .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jButton1)
- .addContainerGap(41, Short.MAX_VALUE))
- );
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
- .addContainerGap(181, Short.MAX_VALUE)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
- .addComponent(jCheckBox4)
- .addComponent(jCheckBox3)
- .addComponent(jCheckBox2)
- .addComponent(jCheckBox1))
- .addGap(65, 65, 65)
- .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addGap(287, 287, 287))
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addGap(207, 207, 207)
- .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGroup(layout.createSequentialGroup()
- .addGap(220, 220, 220)
- .addComponent(jCheckBox1)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jCheckBox2)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jCheckBox3)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jCheckBox4)))
- .addContainerGap(57, Short.MAX_VALUE))
- );
- pack();
- }// </editor-fold>
- private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {
- if(jCheckBox1.isSelected())
- {
- jCheckBox4.setSelected(false);
- }
- }
- private void jCheckBox4ActionPerformed(java.awt.event.ActionEvent evt) {
- if(jCheckBox4.isSelected())
- {
- jCheckBox1.setSelected(false);
- jCheckBox2.setSelected(false);
- jCheckBox3.setSelected(false);
- }
- }
- private void jCheckBox2ActionPerformed(java.awt.event.ActionEvent evt) {
- if(jCheckBox2.isSelected())
- {
- jCheckBox4.setSelected(false);
- }
- }
- private void jCheckBox3ActionPerformed(java.awt.event.ActionEvent evt) {
- if(jCheckBox3.isSelected())
- {
- jCheckBox4.setSelected(false);
- }
- }
- private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {
- // TODO add your handling code here:
- }
- private void jPasswordField1ActionPerformed(java.awt.event.ActionEvent evt) {
- // TODO add your handling code here:
- }
- private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
- String username = jTextField1.getText();
- System.out.println(username);
- char[] password = jPasswordField1.getPassword();
- System.out.println(new String(password));
- this.setVisible(false);
- Home home = new Home();
- home.setVisible(true);
- }
- /**
- * @param args the command line arguments
- */
- public static void main(String args[]) {
- /* Set the Nimbus look and feel */
- //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
- /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
- * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
- */
- try {
- for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
- if ("Nimbus".equals(info.getName())) {
- javax.swing.UIManager.setLookAndFeel(info.getClassName());
- break;
- }
- }
- } catch (ClassNotFoundException ex) {
- java.util.logging.Logger.getLogger(FrameExample2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- } catch (InstantiationException ex) {
- java.util.logging.Logger.getLogger(FrameExample2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- } catch (IllegalAccessException ex) {
- java.util.logging.Logger.getLogger(FrameExample2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- } catch (javax.swing.UnsupportedLookAndFeelException ex) {
- java.util.logging.Logger.getLogger(FrameExample2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- }
- //</editor-fold>
- /* Create and display the form */
- java.awt.EventQueue.invokeLater(new Runnable() {
- public void run() {
- new FrameExample2().setVisible(true);
- }
- });
- }
- // Variables declaration - do not modify
- private javax.swing.JButton jButton1;
- private javax.swing.JCheckBox jCheckBox1;
- private javax.swing.JCheckBox jCheckBox2;
- private javax.swing.JCheckBox jCheckBox3;
- private javax.swing.JCheckBox jCheckBox4;
- private javax.swing.JLabel jLabel1;
- private javax.swing.JLabel jLabel2;
- private javax.swing.JPanel jPanel1;
- private javax.swing.JPasswordField jPasswordField1;
- private javax.swing.JTextField jTextField1;
- // End of variables declaration
- }
- /*
- * 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 lab9;
- import java.awt.Dimension;
- import java.io.IOException;
- import java.nio.file.Files;
- import java.nio.file.Path;
- import javax.swing.JFrame;
- import javax.swing.JTextArea;
- /**
- *
- * @author Student
- */
- public class FrameExample3 extends javax.swing.JFrame {
- /**
- * Creates new form FrameExample3
- */
- public FrameExample3() {
- initComponents();
- }
- /**
- * This method is called from within the constructor to initialize the form.
- * WARNING: Do NOT modify this code. The content of this method is always
- * regenerated by the Form Editor.
- */
- @SuppressWarnings("unchecked")
- // <editor-fold defaultstate="collapsed" desc="Generated Code">
- private void initComponents() {
- jFileChooser1 = new javax.swing.JFileChooser();
- setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
- jFileChooser1.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jFileChooser1ActionPerformed(evt);
- }
- });
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(jFileChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, 667, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addComponent(jFileChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, 467, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addGap(0, 0, Short.MAX_VALUE))
- );
- pack();
- }// </editor-fold>
- private void jFileChooser1ActionPerformed(java.awt.event.ActionEvent evt) {
- Path path = jFileChooser1.getSelectedFile().getAbsoluteFile().toPath();
- String text = null;
- try {
- text = new String(Files.readAllBytes(path));
- System.out.print(text);
- this.setVisible(false);
- JFrame myFrame = new JFrame();
- myFrame.setVisible(true);
- myFrame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
- JTextArea textArea = new JTextArea();
- textArea.setVisible(true);
- textArea.setText(text);
- textArea.setPreferredSize(new Dimension(500,500));
- myFrame.add(textArea);
- myFrame.pack();
- }
- catch(IOException ex) {
- ex.printStackTrace();
- }
- }
- /**
- * @param args the command line arguments
- */
- public static void main(String args[]) {
- /* Set the Nimbus look and feel */
- //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
- /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
- * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
- */
- try {
- for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
- if ("Nimbus".equals(info.getName())) {
- javax.swing.UIManager.setLookAndFeel(info.getClassName());
- break;
- }
- }
- } catch (ClassNotFoundException ex) {
- java.util.logging.Logger.getLogger(FrameExample3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- } catch (InstantiationException ex) {
- java.util.logging.Logger.getLogger(FrameExample3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- } catch (IllegalAccessException ex) {
- java.util.logging.Logger.getLogger(FrameExample3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- } catch (javax.swing.UnsupportedLookAndFeelException ex) {
- java.util.logging.Logger.getLogger(FrameExample3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- }
- //</editor-fold>
- /* Create and display the form */
- java.awt.EventQueue.invokeLater(new Runnable() {
- public void run() {
- new FrameExample3().setVisible(true);
- }
- });
- }
- // Variables declaration - do not modify
- private javax.swing.JFileChooser jFileChooser1;
- // End of variables declaration
- }
- ANGAJATI
- package altpachet;
- import altpachet.Angajat;
- import java.awt.BorderLayout;
- import java.awt.GridLayout;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- import javax.swing.JButton;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import javax.swing.JTextField;
- /*
- * 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.
- */
- /**
- *
- * @author Student
- */
- public class FrameManagementAngajati extends javax.swing.JFrame {
- public ContainerAngajati angajati = new ContainerAngajati();
- /**
- * Creates new form FrameManagementAngajati
- */
- public FrameManagementAngajati() {
- initComponents();
- angajati = new ContainerAngajati();
- }
- private void showAllEmpl(){
- jPanel1.removeAll();
- int n = angajati.getAngajati().size();
- GridLayout layout = new GridLayout(n,2);
- jPanel1.setLayout(layout);
- for(Angajat ang: angajati.getAngajati())
- {
- jPanel1.add(new JLabel(ang.getNume()));
- jPanel1.add(new JLabel(ang.getSalariu().toString()));
- }
- this.setLayout(new BorderLayout());
- jPanel1.setVisible(true);
- this.revalidate();
- }
- /**
- * This method is called from within the constructor to initialize the form.
- * WARNING: Do NOT modify this code. The content of this method is always
- * regenerated by the Form Editor.
- */
- @SuppressWarnings("unchecked")
- // <editor-fold defaultstate="collapsed" desc="Generated Code">
- private void initComponents() {
- jPanel1 = new javax.swing.JPanel();
- jButton1 = new javax.swing.JButton();
- jButton2 = new javax.swing.JButton();
- setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
- javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
- jPanel1.setLayout(jPanel1Layout);
- jPanel1Layout.setHorizontalGroup(
- jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGap(0, 100, Short.MAX_VALUE)
- );
- jPanel1Layout.setVerticalGroup(
- jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGap(0, 100, Short.MAX_VALUE)
- );
- jButton1.setText("jButton1");
- jButton1.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jButton1ActionPerformed(evt);
- }
- });
- jButton2.setText("jButton2");
- jButton2.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jButton2ActionPerformed(evt);
- }
- });
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addGap(93, 93, 93)
- .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addGap(18, 18, 18)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jButton1)
- .addComponent(jButton2))
- .addContainerGap(116, Short.MAX_VALUE))
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addGap(104, 104, 104)
- .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGroup(layout.createSequentialGroup()
- .addGap(133, 133, 133)
- .addComponent(jButton1)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jButton2)))
- .addContainerGap(96, Short.MAX_VALUE))
- );
- pack();
- }// </editor-fold>
- private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
- JFrame frameAdd = new JFrame();
- frameAdd.setVisible(true);
- JLabel LabelNume = new JLabel("nume");
- JLabel LabelSalariu = new JLabel("salariu");
- JTextField numeField = new JTextField("", 3);
- JTextField salariuField = new JTextField("", 3);
- frameAdd.add(LabelNume);
- frameAdd.add(numeField);
- frameAdd.add(LabelSalariu);
- frameAdd.add(salariuField);
- JButton button = new JButton("add");
- button.addActionListener(new ActionListener(){
- @Override
- public void actionPerformed(ActionEvent e){
- angajati.add(new Angajat(numeField.getText(), Integer.parseInt(salariuField.getText())));
- System.out.println(angajati);
- }
- });
- frameAdd.add(button);
- GridLayout layout = new GridLayout(3, 2);
- frameAdd.setLayout(layout);
- frameAdd.pack();
- }
- private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
- showAllEmpl();
- }
- /**
- * @param args the command line arguments
- */
- public static void main(String args[]) {
- /* Set the Nimbus look and feel */
- //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
- /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
- * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
- */
- try {
- for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
- if ("Nimbus".equals(info.getName())) {
- javax.swing.UIManager.setLookAndFeel(info.getClassName());
- break;
- }
- }
- } catch (ClassNotFoundException ex) {
- java.util.logging.Logger.getLogger(FrameManagementAngajati.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- } catch (InstantiationException ex) {
- java.util.logging.Logger.getLogger(FrameManagementAngajati.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- } catch (IllegalAccessException ex) {
- java.util.logging.Logger.getLogger(FrameManagementAngajati.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- } catch (javax.swing.UnsupportedLookAndFeelException ex) {
- java.util.logging.Logger.getLogger(FrameManagementAngajati.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- }
- //</editor-fold>
- /* Create and display the form */
- java.awt.EventQueue.invokeLater(new Runnable() {
- public void run() {
- new FrameManagementAngajati().setVisible(true);
- }
- });
- }
- // Variables declaration - do not modify
- private javax.swing.JButton jButton1;
- private javax.swing.JButton jButton2;
- private javax.swing.JPanel jPanel1;
- // End of variables declaration
- }
- /*
- * 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 altpachet;
- import java.util.ArrayList;
- /**
- *
- * @author Student
- */
- public class ContainerAngajati {
- private ArrayList<Angajat> angajati = new ArrayList<Angajat>();
- public void add(Angajat angajat){
- angajati.add(angajat);
- }
- @Override
- public String toString() {
- return "ContainerAngajati{" + "angajati=" + angajati + '}';
- }
- public ArrayList<Angajat> getAngajati() {
- return angajati;
- }
- public void setAngajati(ArrayList<Angajat> angajati) {
- this.angajati = angajati;
- }
- }
- /*
- * 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 altpachet;
- /**
- *
- * @author Student
- */
- public class Angajat {
- private String nume;
- private Integer salariu;
- public Angajat(String nume, Integer salariu) {
- this.nume = nume;
- this.salariu = salariu;
- }
- public String getNume() {
- return nume;
- }
- @Override
- public String toString() {
- return "Angajat{" + "nume=" + nume + ", salariu=" + salariu + '}';
- }
- public void setNume(String nume) {
- this.nume = nume;
- }
- public Integer getSalariu() {
- return salariu;
- }
- public void setSalariu(Integer salariu) {
- this.salariu = salariu;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement