我帮你写了那些JAVA代码了,效果包你满意!呵呵……
创新互联凭借专业的设计团队扎实的技术支持、优质高效的服务意识和丰厚的资源优势,提供专业的网站策划、成都做网站、网站设计、网站优化、软件开发、网站改版等服务,在成都十余年的网站建设设计经验,为成都上千多家中小型企业策划设计了网站。
至于网页的代码嘛,这里就不贴了。你要的话HI我吧^_^。
JAVA代码如下:
import java.awt.BorderLayout;
import javax.swing.*;
import java.awt.Dimension;
import java.awt.Rectangle;
public class MyLuRu extends JFrame {
private static final long serialVersionUID = 1L;
private JPanel jContentPane = null;
private JLabel jLabel = null;
private JLabel jLabel1 = null;
private JLabel jLabel2 = null;
private JLabel jLabel3 = null;
private JTextField jTextField = null;
private JRadioButton jRadioButton = null;
private JRadioButton jRadioButton1 = null;
private JComboBox jComboBox = null;
private JComboBox jComboBox1 = null;
private JButton jButton = null;
private JButton jButton1 = null;
private JTextArea jTextArea = null;
private ButtonGroup mybg=new ButtonGroup();
/**
* This is the default constructor
*/
public MyLuRu() {
super();
initialize();
}
/**
* This method initializes this
*
* @return void
*/
private void initialize() {
this.setSize(268, 407);
this.setContentPane(getJContentPane());
this.setTitle("录入");
this.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) {
System.exit(0);
}
});
this.setVisible(true);
}
/**
* This method initializes jContentPane
*
* @return javax.swing.JPanel
*/
private JPanel getJContentPane() {
if (jContentPane == null) {
jLabel3 = new JLabel();
jLabel3.setBounds(new Rectangle(16, 150, 65, 18));
jLabel3.setText("文化程度:");
jLabel2 = new JLabel();
jLabel2.setBounds(new Rectangle(16, 108, 39, 18));
jLabel2.setText("专业:");
jLabel1 = new JLabel();
jLabel1.setBounds(new Rectangle(16, 66, 39, 18));
jLabel1.setText("性别:");
jLabel = new JLabel();
jLabel.setBounds(new Rectangle(16, 24, 39, 18));
jLabel.setText("姓名:");
jContentPane = new JPanel();
jContentPane.setLayout(null);
jContentPane.add(jLabel, null);
jContentPane.add(jLabel1, null);
jContentPane.add(jLabel2, null);
jContentPane.add(jLabel3, null);
jContentPane.add(getJTextField(), null);
jContentPane.add(getJRadioButton(), null);
jContentPane.add(getJRadioButton1(), null);
mybg.add(jRadioButton);
mybg.add(jRadioButton1);
jContentPane.add(getJComboBox(), null);
jContentPane.add(getJComboBox1(), null);
jContentPane.add(getJButton(), null);
jContentPane.add(getJButton1(), null);
jContentPane.add(getJTextArea(), null);
}
return jContentPane;
}
/**
* This method initializes jTextField
*
* @return javax.swing.JTextField
*/
private JTextField getJTextField() {
if (jTextField == null) {
jTextField = new JTextField();
jTextField.setBounds(new Rectangle(61, 24, 180, 18));
}
return jTextField;
}
/**
* This method initializes jRadioButton
*
* @return javax.swing.JRadioButton
*/
private JRadioButton getJRadioButton() {
if (jRadioButton == null) {
jRadioButton = new JRadioButton();
jRadioButton.setBounds(new Rectangle(61, 62, 38, 26));
jRadioButton.setText("男");
}
return jRadioButton;
}
/**
* This method initializes jRadioButton1
*
* @return javax.swing.JRadioButton
*/
private JRadioButton getJRadioButton1() {
if (jRadioButton1 == null) {
jRadioButton1 = new JRadioButton();
jRadioButton1.setBounds(new Rectangle(117, 62, 38, 26));
jRadioButton1.setText("女");
}
return jRadioButton1;
}
/**
* This method initializes jComboBox
*
* @return javax.swing.JComboBox
*/
private JComboBox getJComboBox() {
if (jComboBox == null) {
String[] strcb={"计算机","电子","工商"};
jComboBox = new JComboBox(strcb);
jComboBox.setBounds(new Rectangle(62, 108, 93, 18));
}
return jComboBox;
}
/**
* This method initializes jComboBox1
*
* @return javax.swing.JComboBox
*/
private JComboBox getJComboBox1() {
if (jComboBox1 == null) {
String[] strcb2={"大专","本科","硕士","博士"};
jComboBox1 = new JComboBox(strcb2);
jComboBox1.setBounds(new Rectangle(92, 150, 125, 18));
}
return jComboBox1;
}
/**
* This method initializes jButton
*
* @return javax.swing.JButton
*/
private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setBounds(new Rectangle(66, 181, 60, 28));
jButton.setText("提交");
jButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
String strname=jTextField.getText();
String strsex="男";
if(jRadioButton1.isSelected()){
strsex="女";
}
String strzy=jComboBox.getSelectedItem().toString();
String strwh=jComboBox1.getSelectedItem().toString();
jTextArea.setText("姓名:"+strname+"\r\n"+"性别:"+strsex+"\r\n"+"专业:"+strzy+"\r\n"+"文化:"+strwh);
}
});
}
return jButton;
}
/**
* This method initializes jButton1
*
* @return javax.swing.JButton
*/
private JButton getJButton1() {
if (jButton1 == null) {
jButton1 = new JButton();
jButton1.setBounds(new Rectangle(158, 181, 60, 28));
jButton1.setText("取消");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.exit(0);
}
});
}
return jButton1;
}
/**
* This method initializes jTextArea
*
* @return javax.swing.JTextArea
*/
private JTextArea getJTextArea() {
if (jTextArea == null) {
jTextArea = new JTextArea();
jTextArea.setBounds(new Rectangle(16, 225, 229, 130));
}
return jTextArea;
}
public static void main(String args[]){
new MyLuRu();
}
}
效果如下图:
代码如下
/**
* Author: zhyx
* Date:2017/11/30
* Time:8:56
*/
public abstract class Contailner {
double r;
abstract double volume();
}
/**
* Author: zhyx
* Date:2017/11/30
* Time:8:57
*/
public class Cube extends Contailner {
public Cube(double r) {
this.r=r;
}
@Override
double volume() {
return r*r*r;
}
}
/**
* Author: zhyx
* Date:2017/11/30
* Time:9:01
*/
public class Sphere extends Contailner {
public Sphere(double r) {
this.r=r;
}
@Override
double volume() {
return 4/3*Math.PI*r*r*r;
}
}
/**
* Author: zhyx
* Date:2017/11/30
* Time:9:02
*/
public class Tiji {
public static void main(String[] args) {
Cube cube=new Cube(4);
System.out.println("立方体体积为:"+cube.volume());
Sphere sphere= new Sphere(4);
System.out.println("球体体积为:"+sphere.volume());
}
}
用Java编写一个员工类程序:1.属性:员工编号,员工姓名,基本工资,奖金,2.构造方法:至少两个。如下:
package com.test;
public class Employee {
/**
* 员工编号
*/
private String number;
/**
* 员工姓名
*/
private String name;
/**
* 员工薪水
*/
private double salary;
/**
* 无参数构造函数
*/
public Employee() {
}
/**
* 给属性赋值构造函数
* @param number
* @param name
* @param salary
*/
public Employee(String number, String name, double salary) {
super();
this.number = number;
this.name = name;
this.salary = salary;
}
public static void main(String[] args) {
//员工一,并且构造函数里设置值
Employee e1 = new Employee("e0001", "xiaoming", 5000.0);
System.out.println("员工一:" + e1);
//员工二,用set设置值,get的话可以获取到员工某个属性
Employee e2 = new Employee();
e2.setName("小二");
e2.setNumber("e0002");
e2.setSalary(5500.1);
System.out.println("员工二:" + e2);
}
public String getNumber() {
return number;
}
public void setNumber(String number) {
this.number = number;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public double getSalary() {
return salary;
}
public void setSalary(double salary) {
this.salary = salary;
}
@Override
public String toString() {
return "Employee [number=" + number + ", name=" + name + ", salary=" +
salary + "]";
}
}
运行结果:
员工一:Employee [number=e0001, name=xiaoming, salary=5000.0]
员工二:Employee [number=e0002, name=小二, salary=5500.1]
1、代码能力
代码能力是基本功,Java语言本身,包括语言的各个方面包括对并发的理解,对内存使用对理解,对Java运维的理解等等,语言本身外,社区里常用的框架是否可以十分清晰的了解,包括spring,包括他实现的ioc,aop,orm,web机制是否有清楚的认识,有丰富的经验等等。
2、对常用中间件的理解
毕竟在一个大系统中,各种中间件是是否常见的,缓存中间件,消息中间件,例如
redis、memcache、rmq这些,要理解常用中间件使用场景,使用姿势(例如redis的常用命令),甚至包括他的一些运维,一旦出了问题,除了专门的运维人员,也需要你参与问题的排查,因为有时候这些中间件出现问题,是不当的使用姿势引起的。
3、架构、业务落地能力
前面提到了语言本身,各种中间件,如果你有很好的业务抽象能力和架构思维,就可以把一款部门内部产品很好的设计并实施了,这点蛮难的,想必都有过接手现有项目的经历吧,有时候真恨不得把之前的设计者拿出来批斗,作为一个设计者,你能否做到当下一个接手它的人会说一句,这个系统设计的真好,稳定又可拓展,理解起来也很容易。
4、沟通协作
毕竟一个部门内部产品,是不可能由一个人完成的,所以需要沟通协作,把设计好的方案,要和2-3个小伙伴一起实施,包括同样身份的后端人员,前端人员,产品等角色,这个级别的人可能会参与带2-3个人,例如应届毕业等,所以你自己对知识的把握,分享精神,leadership都是很好的加分项。