zoukankan      html  css  js  c++  java
  • 菜鸡的Java笔记 笔记

    // 雇员编号 姓名 职位 基本工资 佣金等信息
    package study;
    class Enr{
        private int number;      // 编号
        private String fullName; // 姓名
        private String position; // 职位
        private int wages;       // 工资
        private int commission;  // 佣金
        public Enr(){}
        public Enr(int n,String f,String p,int w,int c){
            setNumber(n);
            setFullName(f);//出错
            setPosition(p);//出错
            setWages(w);
            setCommission(c);
        }
        public String getlnfo(){
            return  "编号"+number+"
     "+
                    "姓名"+fullName+"
     "+
                    "职位"+position+"
     "+
                    "工资"+wages+"
    "+
                    "佣金"+commission;
        }
        public int setNumber(int n){
            number = n;
        }
        public String setFullName(Srting f){
            fullName = f;
        }
        public Srting setPosition(Srting p){
            position = p;
        }
        public int setWages(int w){
            wages = w;
        }
        public int setCommission(int c){
            commission = c;
        }
        public int getNuymber(){
            return number;
        }
        public Sttring getFullName(){
            return fullName;
        }
        public String getPosition(){
            return position;
        }
        public int getWages(){
            return wages;
        }
        public int getCommission(){
            return commission;
        }
    }
    
    public class practice{
        public static void main(String args[]){
            Enr study1 = new Enr(6666,"?????","////",6666,0.0)  // 出错
            System.out.println(study1.getlnfo());
        }
    }
  • 相关阅读:
    Visual Studio 2010 C++ 属性设置基础
    Visual Studio 2010 C++ 工程文件解读
    编译Python2.7.10
    编译libmemcached
    python2.7.10 VS2015编译方法
    zlib编译方法
    Openssl VS编译方法
    STL容器
    C++数值类型与string的相互转换
    NGINX配置文件详解
  • 原文地址:https://www.cnblogs.com/mysterious-killer/p/10140740.html
Copyright © 2011-2022 走看看