面向对象的三大特性:封装、继承、多态。从一定角度来看,封装和继承几乎都是为多态而准备的。这是我们最后一个概念,也是最重要的知识点。
多态的定义:指允许不同类的对象对同一消息做出响应。即同一消息可以根据发送对象的不同而采用多种不同的行为方式。(发送消息就是函数调用)
(1)相同方法名的方法分别在子,基类中调用
源代码:
public class ParentChildTest {
public static void main(String[] args) {
Parent parent=new Parent();
parent.printValue();
Child child=new Child();
child.printValue(); parent=child;
parent.printValue(); parent.myValue++;
parent.printValue(); ((Child)parent).myValue++;
parent.printValue(); }
} class Parent{
public int myValue=100;
public void printValue() {
System.out.println("Parent.printValue(),myValue="+myValue);
}
}
class Child extends Parent{
public int myValue=200;
public void printValue() {
System.out.println("Child.printValue(),myValue="+myValue);
}
}

实验结果截图:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXQAAACDCAIAAAAS4XcRAAAQF0lEQVR4nO2c0aG0KgyEty4L2nos4VaxzViM9+GoC2QSAi6/iPM9nSMrQoQhIOS1EkJIA17/EUJIA15XqxshZEwoLoSQJlBcCCFNoLgQQppAcSGAZZ5e709yZZqXq8pD7gjFxebzfr1er3661V95NuLu/zOWeRKZ/13ryBAO/oWtiMFXXKJX0VdDWubpquJUiwss8+etZKYmmOVq0mF0YxcX8hR3sJXBpsbwuWFXkxWxU+9EIi5fU/Q0ZF8oLtXgMisdo7z5t+owtqn/6Yvo3lbm86b5AxzAtDSijnbqzVDFBXvH1zCOuOD2UtH6G3WYbLb/sqN2bivMd7UK9h9RFqkmaurtMMRFvNzd0wOT2GWeXtO8hD9JWoXq7H3efxeCH+xZxw8McdnbyNlRZmvGfqLMoMekljfsrN4DrymvFL+gsF4Ghc19M/L23PcnWrzBw9f3CV3bylX19Ln4sVHbUFPvh19cPu/Awn+1/v76eMfbpWTcjvJGacGtoClUei4w5282mTLrdjlXZtsTztg5Xyqjw1hvQc3U9WSdZZ5e0zRN8/L3wGl6f0z5iLpkx7byVR2MwUkLfM/HNTv1huSmRVq9gCHkiLKl45wj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Gu4BVaJ3O0+GywKCL6oQoe28pHGwDqqF54DpbhcKC5y0l0tLlHbvS6GbtBjtAlVxM86jD3cXiIuIpApGl76s5W36nGB/uqnRf8X9z5DXNDSWshdxKUPzyUwJ/a/KyeYpaNxSrNpkSkuQYYwrkN3tvJNizaBgvNpMc8XD3uUuGRq20xc0vaO4xhZMXT1RYULxWXvMZ1FtHf5JOqP4FtwxdDdUqyqdmcrE6wsMGdszmeJC+rXjP5v/cghx6AFRoXcx0jv0nh4Mf0W5mmwniatW+2okqLnuriAwsKMe7KVTrrQglLVjvOD598FRv/HpXKKqbUJY89f3BQ+eGL0/35tZVkIINwkUCdlxjWmyNz7VHTRyiNZ1/Xk9v/68fYJIzWJobg8D72fu6Slaqni1C41ck8oLk8Eq4T1wXDz8yvlIfMpkowJxeWhLIz+Txpzb3EhhHQLxYUQ0gSKCyGkCRQXQkgTKC6EkCZQXAghTaC4EEKaQHEhhDSB4kIIaQLFhRDSBIoLIaQJFBdCSBMoLoSQJlBcCCFNoLgQQppAcSGENIHiQghpAsWFENIEigshpAn/AwQ3ztpXLdPmAAAAAElFTkSuQmCC" alt="" />

 分析:当子类与父类拥有一样的方法,并且让一个父类变量引用一个子类对象时,到底调用哪个方法,由对象自己的“真实”类型所决定,这就是说:对象是子类型的,它就调用子类型的方法,是父类型的,它就调用父类型的方法。
如果子类与父类有相同的字段,则子类中的字段会代替或隐藏父类的字段,子类方法中访问的是子类中的字段(而不是父类中的字段)。如果子类方法确实想访问父类中被隐藏的同名字段,可以用super关键字来访问它。
(2)用多态方法模拟ATM操作流程
源代码:
package bokeyuan;

import java.util.Scanner;
public class ATMTest {
public static void main(String[] args) {
ABCATM atm=new ABCATM();
UnionPay abc=new ABCImpl(3000,1603);
atm.insertCard(abc);
atm.allMenu();
}
}
//农行ATM
class ABCATM{
UnionPay card;
Scanner sc=new Scanner(System.in);
public void insertCard(UnionPay card){
this.card=card;
}
public void outCard(){
card=null;
}
public void showBalance(){ //显示余额
System.out.println("卡内余额:"+card.getBalance());
}
public void takeMoney(){ //取钱
System.out.println("请输入取钱金额:");
double number=sc.nextDouble();
if(card.drawMoney(number)){
System.out.println("取款成功!");
}else{
System.out.println("取款失败!");
}
}
public void payTelBill(){ //电话缴费
if(card instanceof ABCImpl){
ABCImpl abccard=(ABCImpl)card;
System.out.println("请输入电话号码:");
String phoneNum=sc.next();
while(phoneNum.length()!=11){
System.out.println("请输入电话号码:");
phoneNum=sc.next();
}
if(phoneNum.length()==11){
System.out.println("请输入缴费金额:");
double calls=sc.nextDouble();
if(abccard.payTel(phoneNum,calls)){
System.out.println("缴费成功!");
}else{
System.out.println("缴费失败!");
}
}else{
System.out.println("您输入的电话号码有误!");
}
}else{
System.out.println("您的银行卡非农行卡,不支持电话缴费");
}
}
public void allMenu(){ //功能菜单
do{
System.out.println("请输入密码:");
int input=sc.nextInt();
if(card.checkPwd(input)){
System.out.println("请选择功能:1.查询余额 2.电话缴费 3.取款 0.退出");
int a=sc.nextInt();
if(a==0){
System.out.println("退出系统!");
break;
}else{
switch(a){
case 1:showBalance();
break;
case 2:payTelBill();
break;
case 3:takeMoney();
break;
default:System.out.println("非法输入!");
}
}
break;
}else{
System.out.println("密码错误!");
System.out.println("请输入密码:");
input=sc.nextInt();
}
}while(true);
}
}
//银联接口
interface UnionPay {
public boolean drawMoney(double number); //取钱
public boolean checkPwd(int input); //验证密码
public double getBalance(); //显示余额
}
//农行卡接口
interface ABC extends UnionPay{
public boolean payTel(String phoneNum,double calls); //支付电话费
}
//实现农行卡接口
class ABCImpl implements ABC{
private double money;
private int pwd;
public ABCImpl(double money,int pwd){
this.money=money;
this.pwd=pwd;
}
public boolean payTel(String phoneNum,double calls){
if(phoneNum.length()==11&&calls<money){
money-=calls;
return true;
}
return false;
}
public boolean drawMoney(double number){
if(number<money){
money-=number;
return true;
}
return false;
}
public boolean checkPwd(int input){
if(pwd==input){
return true;
}
return false;
}
public double getBalance(){
return money;
}
}

运行结果:

aaarticlea/png;base64,iVBORw0KGgoAA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9blForgWAZ6DeIH+Mb8WrjynspqTLWhSqawHgGVi/V1g8AbyE3XuRdOV7FX8tADyDQBReb5xn0Va8NfbXAsATMKJw/jJkd2r9mqG9FgAeX+xXrC/fRbF+kdBfCwAP7xqFp/eXVHzx7vbLMTflV+tk0vlrAeCh8c8xAABRCABEIQBkohAAMlEIAJkoBIBMFAJAJgoBIBOFAJBXRmFK9eZyib9tpHyrzG5IKW1G8f+lAoCoa8okIbTx6iiMbEIUAvjfbilTZZMTjnJVPNfk7qqF/XWexg1RCGAVMwrzPIOs5Ko+xqPTmYT624pWEIUA1tJDZ1pSrp1t1pq+9caos6pVFVEIYK1Vs8JZRW5uOuXlWqIQwDdbGIXOvbCyD3cKSRQC+HHeDXLu+ZWXsryz8H9F4cA/FwtgOS+kshGF8lWGk2tqhVbNaiXNWeduIAoBrKKHVDPdrFX3isLI25gJUQhgJf1XrGcl7HSr4sxKNyvL1Jtlf+/xW3UAiAtN4qw8UkPQikLnKWR84qmV3A0pMS0EsEb011zid76ycHOeaEVh7AacKASwVuPmVy6ffvafJ0ZWOUvkQicxAWAlwgUAiEIAIAoBIBOFAJCJQgDIRCEAZKIQADJRCACZKASATBQCQCYKASAThQCQiUIAyEQhAOSc/wFF+Uj/Bbr6CAAAAABJRU5ErkJggg==" alt="" />

 

JAVA多态问题总结(课堂总结)的更多相关文章

  1. Java 多态——与C++的比较

    学习了Java和C++之后,由于长期不使用C++,而java的基础知识掌握不牢,现在已经搞不清java多态了.现在先来谈谈java多态,稍后有时间再更新C++的多态,并进行比较~ 一. Java的多态 ...

  2. C++和java多态的区别

    C++和java多态的区别 分类: Java2015-06-04 21:38 2人阅读 评论(0) 收藏 举报  转载自:http://www.cnblogs.com/plmnko/archive ...

  3. 深入理解Java多态机制

    从字节码层面来看,Java中的所有方法调用,最终无外乎转换为如下几条调用指令. invokestatic: 调用静态方法. invokespecial: 调用实例构造器<init>方法,私 ...

  4. Java 多态 父类和子类方法的访问控制权限

    Java 多态 父类和子类方法的访问控制权限 @author ixenos 父类和子类方法的访问控制权限 继承是为了扩展类的功能,而这种扩展显然就是对一个原始类的扩展,目的还是向上转型来调用,所以这就 ...

  5. Java多态(二)

    public class ExtendsTest { public static void main(String[] args) { A a1 = new A(); A a2 = new B(); ...

  6. 从JVM角度看Java多态

    首先,明确一下,Java多态的三个必要条件: 1. 继承 2. 子类重写父类方法 3. 父类引用指向子类对象 然后看一个例子 package test.xing; class Father{ prot ...

  7. 关于java多态的理解

    要理解多态,就必须有一个大的理解方向,不然很容易绕进去. 首先知道多态的释义:多态性是指一个名词可以有多种语义. 对于java的多态性学习者来说,就是必须要知道多个同名方法在不同情况下的使用规则. j ...

  8. Java经验杂谈(2.对Java多态的理解)

    多态是面向对象的重要特性之一,我试着用最简单的方式解释Java多态: 要正确理解多态,我们需要明确如下概念:・定义类型和实际类型・重载和重写・编译和运行 其中实际类型为new关键字后面的类型. 重载发 ...

  9. 学JAVA第十六 天,JAVA多态

    今天老师讲了多态的使用 多态是同一个行为具有多个不同表现形式或形态的能力. 多态的优点: 1. 消除类型之间的耦合关系 2. 可替换性  3. 可扩充性 4. 接口性 5. 灵活性 6. 简化性 我个 ...

  10. 对java多态的理解

    java多态,如何理解父类引用指向子类对象 要理解多态性,首先要知道什么是“向上转型”. 我定义了一个子类Cat,它继承了Animal类,那么后者就是前者是父类.我可以通过 Cat c = new C ...

随机推荐

  1. javascript数组、对象和Null的typeof同为object,区分解决办法

    在JS里typeof 大家用的很多,可以使对于数组.对象和Null无法区分的问题,看了看犀牛书还是有解决办法的. document.writeln(typeof "abc"); / ...

  2. Kendo UI开发教程(7): Kendo UI 模板概述

    Kendo UI 框架提供了一个易用,高性能的JavaScript模板引擎.通过模板可以创建一个HTML片段然后可以和JavaScript数据合并成最终的HTML元素. Kendo 模板侧重于UI显示 ...

  3. Python中的eval()、exec()及其相关函数

    刚好前些天有人提到eval()与exec()这两个函数,所以就翻了下Python的文档.这里就来简单说一下这两个函数以及与它们相关的几个函数,如globals().locals()和compile() ...

  4. Oracle基础学习(一)常用函数

    1.绝对值:abs() select abs(-2) value from dual; 2.取整函数(大):ceil() select ceil(-2.001) value from dual;(-2 ...

  5. C语言之冒泡排序

    冒泡排序: 1). 简介 其实就是把一个数组的元素,按照从小到大(从大到小)得顺序,重新排列起来,这种排序就叫冒泡排序 例: int nums[5] = {5,4,3,2,1}; //经过排序后 下标 ...

  6. 手机端H5 header定义样式

    <meta content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=0" ...

  7. Kafka connect快速构建数据ETL通道

    摘要: 作者:Syn良子 出处:http://www.cnblogs.com/cssdongl 转载请注明出处 业余时间调研了一下Kafka connect的配置和使用,记录一些自己的理解和心得,欢迎 ...

  8. 【USACO】接住苹果

    接住苹果奶牛喜欢吃苹果.约翰有两棵苹果树,有 N 只苹果会从树上陆续落下.如果掉苹果的时候,贝西在那棵树下,她就能接住苹果.贝西一开始在第一棵树下.在苹果掉落之前,她有足够的时间来回走动,但她很懒,最 ...

  9. JS-兼容

    [个人汇总] 1.JS判断是否点击回车键/enter键 $(document).keypress(function(event){ var keycode = (event.keyCode ? eve ...

  10. 单机Hadoop搭建

    通过一段时间的学习,我在我的centos上安装了单机hadoop,如果这对你有帮助,就进来探讨学习一下 Hadoop伪分布式配置 Hadoop 可以在单节点上以伪分布式的方式运行,Hadoop 进程以 ...