北邮国际学院大二Java实验-lab1
北邮电子院专业实验报告

电子工程学院ASIC专业实验报告班级:姓名:学号:班内序号:第一部分语言级仿真LAB 1:简单的组合逻辑设计一、实验目的掌握基本组合逻辑电路的实现方法。
二、实验原理本实验中描述的是一个可综合的二选一开关,它的功能是当sel = 0时,给出out = a,否则给出结果out = b。
在Verilog HDL中,描述组合逻辑时常使用assign结构。
equal=(a==b)1:0是一种在组合逻辑实现分支判断时常用的格式。
parameter定义的size 参数决定位宽。
测试模块用于检测模块设计的是否正确,它给出模块的输入信号,观察模块的内部信号和输出信号。
三、源代码module scale_mux(out,sel,b,a);parameter size=1;output[size-1:0] out;input[size-1:0]b,a;input sel;assign out = (!sel)a:(sel)b:{size{1'bx}};endmodule`define width 8`timescale 1 ns/1 nsmodule mux_test;reg[`width:1]a,b;wire[`width:1]out;reg sel;scale_mux#(`width)m1(.out(out),.sel(sel),.b(b),.a(a));initialbegin$monitor($stime,,"sel=%b a=%b b=%b out=%b",sel,a,b,out);$dumpvars(2,mux_test);sel=0;b={`width{1'b0}};a={`width{1'b1}};#5sel=0;b={`width{1'b1}};a={`width{1'b0}};#5sel=1;b={`width{1'b0}};a={`width{1'b1}};#5sel=1;b={`width{1'b1}};a={`width{1'b0}};#5 $finish;endendmodule四、仿真结果与波形LAB 2:简单时序逻辑电路的设计一、实验目的掌握基本时序逻辑电路的实现。
北邮 软件安全实验1

选择二进制->编辑
我们会看到这个语句的操作码,74代表着JE 我们把74修改为75(代表JNE) 我们就成功把这个汇编语言进行了修改。
修改分支判断
修改分支判断
验证修改后的程序
我们将内存中的汇编语句进行修改后,我们再来接
着运行下程序 点击运行,我们现在在输入框中输入正确的密码, 观察程序反应,发现程序提示我们输入密码错误 ! 然后我们随便输入一个错误的密码,程序提示正确 ,并自动退出
之后我们就可以在虚拟机内进行操作了
进入虚拟机
研究代码
用VC打开概述实验文件夹下的stack_show.c的文件
点击桌面上的VC的快捷方式,点击文件->打开->选 择“概述实验”文件夹下的crackme.c的文件
先对 c 文件中的代码进行研究,弄懂之后可以编译 成工程运行或者先绘制程序的结构图(流程图)
生成工程
之后再新建->文件->C++ Source File
右侧设定好添加到的项目 ( 我们刚才新建的项目 ), 文件名和路径
完成新建文件后,在新建的文件下编写或复制刚才 我们看到的 crackme 程序,然后点击右上的红色 感叹号执行
生成工程
生成工程
运行程序
程序运行后我们简单的测试一下
输入错误的密码,看判断是否正确
研究代码
生成工程
在 VC 中 , 点 击 新 建 -> 工 程 (projects)-> 选 择
projects类型为win32 console application
右上角设置好project的名称和存放路径
点击确定新建项目 -> 选择 empty project-> 新建项 目完成
JAVA实验

Java实验报告专业班级学号姓名指导教师实验一、安装JDK并熟悉java的运行环境一、实验目的熟悉JA V A的运行环境及学习简单的编程。
二、预习内容安装工具软件的基本方法。
三、实验设备与环境装有JA V A语言工具软件(JCreator )的微机若干四、实验内容安装JCreator及JA V A的核心编译程序J2SDK。
1、打开JCreator的安装盘安装JCreator。
2、在相同目录下安装J2SDK。
3、打开JCreator软件对J2SDK文件进行配置。
4、编写一应用程序,在屏幕上显示“HELLO WORLD”。
public class Hello{public static void main(String args[]){System.out.println( "HELLO WORLD");}}5、编写一小程序实现上述功能:在屏幕上显示“HELLO WORLD”。
实验结果:五、注意事项⒈认真填写实验报告⒉遵守实验室各项制度,服从实验指导教师的安排⒊按规定的时间完成实验六、实验总结与体会1.通过这个实验我了解到java的运行环境。
2.通过这个简单的程序使我认识到做实验是要认真对待,不可马虎大意,区分字母的大小写和符号的正确使用。
实验二、基本语法练习一、实验目的⒈熟悉Java的基本语法⒉编写应用程序接收命令行参数⒊编写应用程序接收用户从键盘的输入⒋掌握字符串与数组的基本方法二、预习内容java编程的基本结构三、实验设备与环境装有JA V A语言工具软件(JCreator )的微机若干四、实验内容⒈编写一个应用程序求若干个数的平均数,原始数字要求从命令行输入。
应用程序中main方法的参数String类型的数组args能接受用户从命令行键入的参数。
(1)编辑A verage.java,设保存在D:\myjava目录下。
public class Average{public static void main(String args[ ]){double n,sum=0;for (int l=0;l<args.length;l++){sum=sum+Double.valueOf(args[l]).doubleValue();}n=sum/args.length;System.out.println("average="+n);}}(2)编译。
BUAAOS——Lab1实验报告

BUAAOS——Lab1实验报告lab1实验报告实验思考题1.1也许你会发现我们的readelf程序是不能解析之前⽣成的内核⽂件(内核⽂件是可执⾏⽂件)的,⽽我们之后将要介绍的⼯具readelf则可以解析,这是为什么呢?(提⽰:尝试使⽤readelf -h,观察不同)通过linux内置的readelf⼯具即使⽤readelf -h命令⾏分别对testELF⽂件和之前⽣成的内核⽂件vmlinux的elf⽂件头进⾏查看:可以很清楚的看出,之前⽣成的vmlinux内核⽂件为⼤端存储,⽽testELF为⼩端存储。
因此我们⾃⼰编写的readelf程序只能解析testELF⽽不能解析vmlinux内核⽂件,因为编写readelf程序使⽤c语⾔不能简单的读取⼤端存储的数据。
1.2内核⼊⼝在什么地⽅?main 函数在什么地⽅?我们是怎么让内核进⼊到想要的 main 函数的呢?⼜是怎么进⾏跨⽂件调⽤函数的呢?内核的⼊⼝的起始地址为0x80000000,main函数在0x80010000。
在⼊⼝函数本实验为start.S内部使⽤跳转指令jal跳转到指定的函数地址。
跨⽂件调⽤函数通过跳转指令来调⽤,同时在跳转之前需要将数据存⼊栈中。
实验难点图⽰本次课下实验的难点其实就是能否读懂现有代码以及学习如何调⽤现有的⼯具。
例如在编写readelf.c⽂件中,我们可以从ELF⼿册中得知每个elf⽂件头结构体的结构,以及它内部的数据,随后根据适当的处理得出每个Section的结构体,再从其中获取所需要的数据。
即思路可以概括为⼀下步骤:知道结构体中的数据typedef struct {unsigned char e_ident[EI_NIDENT]; /* Magic number and other info */// 存放魔数以及其他信息Elf32_Half e_type; /* Object file type */// ⽂件类型Elf32_Half e_machine; /* Architecture */// 机器架构Elf32_Word e_version; /* Object file version */// ⽂件版本Elf32_Addr e_entry; /* Entry point virtual address */// ⼊⼝点的虚拟地址Elf32_Off e_phoff; /* Program header table file offset */// 程序头表所在处与此⽂件头的偏移Elf32_Off e_shoff; /* Section header table file offset */// 段头表所在处与此⽂件头的偏移Elf32_Word e_flags; /* Processor-specific flags */// 针对处理器的标记Elf32_Half e_ehsize; /* ELF header size in bytes */// ELF⽂件头的⼤⼩(单位为字节)Elf32_Half e_phentsize; /* Program header table entry size */// 程序头表⼊⼝⼤⼩Elf32_Half e_phnum; /* Program header table entry count */// 程序头表⼊⼝数Elf32_Half e_shentsize; /* Section header table entry size */// 段头表⼊⼝⼤⼩Elf32_Half e_shnum; /* Section header table entry count */// 段头表⼊⼝数Elf32_Half e_shstrndx; /* Section header string table index */// 段头字符串编号} Elf32_Ehdr;了解readelf.c⽂件中已有代码如何获取结构体中的数据仿照已有代码获取所需要的数据:e_shoff、e_shentsize、e_shnum再例如补全print.c⽂件中的代码,需要的也是这种思路:了解已有的specifier的处理过程查看已有的printNum、printChar等⽅法获取所需要的各种参数仿照已有的specifier的处理过程,对d、D进⾏处理同时需要充分熟悉有关C语⾔指针的知识⽽对于更多的细节,对于本次实验练习关系并不是很⼤,只需要⼤致了解内核启动和编译链接的过程。
LAB-1:数据链路层及网络层数据包的捕捉与分析-2013版

LAB-1:IEEE802标准和以太网数据链路层协议分析一.实验目的1.掌握以太网的报文格式2.掌握MAC地址、MAC广播地址的作用3.理解数据链路层协议的工作机制,掌握数据链路层帧(Ethernet II)的报文格式4.掌握网络协议编辑器软件(科来数据包生成器)的使用方法5.熟练掌握网络协议分析软件(WIRESHARK)的使用方法二.实验内容与步骤1.捕获真实的MAC帧●主机A、B作为一组,主机B启动协议分析软件,并设置只提取ICMP协议数据包的捕获过滤条件,主机A PING主机B,检查主机B捕获的数据包,并分析记录MAC帧格式●记录实验结果2.理解MAC地址的作用●主机A、B、C、D作为一组,主机A PING 主机C,主机B、D启动协议分析软件,并设置只提取源MAC地址为主机A的数据包捕获过滤条件,检查主机A所发送的ICMP数据帧,并分析该帧的内容。
●记录实验结果3.编辑并发送MAC广播帧●主机A、B、C、D作为一组,主机D启动协议编辑器,并编辑一个MAC帧(目标MAC: FFFFFFFFFFFF,源MAC: 主机D的MAC地址,协议类型或数据长度:大于0X600,数据字段:编辑长度在46-1500字节之间的数据),主机A、B、C启动协议分析软件,并设置只提取源MAC地址为主机D的数据包捕获过滤条件,主机D发送已编辑好的MAC帧,主机A、B、C捕获和检查是否有主机D所发送的MAC数据帧,并分析该帧的内容。
●记录实验结果三.实验结果分析与思考1. 在实验步骤2中,为什么有的主机会收到ICMP数据包而有的主机收不到?2. 在实验步骤3中,简述FFFFFFFFFFFF作为目标MAC地址的作用,主机A、B、C是否均可以收到主机D的广播帧?3. 结合实验结果,说明MAC广播帧的作用范围?四.实验报告1.按上述实验步骤与内容撰写实验报告(抄袭他人实验结果,双方均不计成绩)2.要求说明实验时间、地点及同级成员名单。
java实验报告

java实验报告Java 实验报告一、实验目的本次 Java 实验的主要目的是通过实际编程操作,深入理解和掌握Java 语言的基本语法、面向对象编程的概念和方法,以及常用类库的使用。
同时,培养我们的问题解决能力、逻辑思维能力和代码规范意识,为今后的软件开发工作打下坚实的基础。
二、实验环境1、操作系统:Windows 102、开发工具:Eclipse IDE for Java Developers3、 JDK 版本:JDK 18三、实验内容本次实验共包括以下三个部分:1、 Java 基本语法练习变量与数据类型运算符与表达式控制流语句(ifelse、for、while、dowhile)数组2、面向对象编程实践类与对象的定义和使用构造函数与方法重载封装、继承与多态抽象类与接口3、 Java 常用类库应用String 类与字符串操作集合框架(ArrayList、HashMap)文件输入输出(File、FileReader、FileWriter)四、实验步骤及代码实现1、 Java 基本语法练习变量与数据类型:```javapublic class VariableDataType {public static void main(String args) {int age = 20;double salary = 50005;String name ="张三";boolean isStudent = true;Systemoutprintln("年龄:"+ age);Systemoutprintln("工资:"+ salary);Systemoutprintln("姓名:"+ name);Systemoutprintln("是否是学生:"+ isStudent);}}```运算符与表达式:```javapublic class OperatorExpression {public static void main(String args) {int num1 = 10;int num2 = 5;int sum = num1 + num2;int difference = num1 num2;int product = num1 num2;int quotient = num1 / num2;int remainder = num1 % num2; Systemoutprintln("和:"+ sum);Systemoutprintln("差:"+ difference);Systemoutprintln("积:"+ product);Systemoutprintln("商:"+ quotient);Systemoutprintln("余数:"+ remainder);}}```控制流语句:```javapublic class ControlFlowStatement {public static void main(String args) {// ifelse 语句int score = 80;if (score >= 90) {Systemoutprintln("优秀");} else if (score >= 80) {Systemoutprintln("良好");} else if (score >= 70) {Systemoutprintln("中等");} else if (score >= 60) {Systemoutprintln("及格");} else {Systemoutprintln("不及格");}// for 循环for (int i = 1; i <= 5; i++){Systemoutprintln("第" + i +"次循环");}// while 循环int j = 1;while (j <= 5) {Systemoutprintln("第" + j +"次 while 循环");j++;}// dowhile 循环int k = 1;do {Systemoutprintln("第" + k +"次 dowhile 循环");k++;} while (k <= 5);}}```数组:```javapublic class ArrayExample {public static void main(String args) {//一维数组int numbers ={1, 2, 3, 4, 5};for (int num : numbers) {Systemoutprintln(num);}//二维数组int matrix ={{1, 2, 3},{4, 5, 6},{7, 8, 9}};for (int row : matrix) {for (int num : row) {Systemoutprint(num +"");}Systemoutprintln();}}}```2、面向对象编程实践类与对象的定义和使用:```javapublic class Person {private String name;private int age;public Person(String name, int age) {thisname = name;thisage = age;}public void showInfo(){Systemoutprintln("姓名:"+ name +",年龄:"+ age);}public static void main(String args) {Person person1 = new Person("张三", 20);person1showInfo();}}```构造函数与方法重载:```javapublic class ConstructorOverloading {private String name;private int age;public ConstructorOverloading(String name) {thisname = name;}public ConstructorOverloading(String name, int age) {thisname = name;thisage = age;}public void showInfo(){if (age == 0) {Systemoutprintln("姓名:"+ name);} else {Systemoutprintln("姓名:"+ name +",年龄:"+ age);}}public static void main(String args) {ConstructorOverloading person1 = new ConstructorOverloading("张三");person1showInfo();ConstructorOverloading person2 = new ConstructorOverloading("李四", 25);person2showInfo();}}```封装、继承与多态:```java//父类class Animal {private String name;public Animal(String name) {thisname = name;}public void eat(){Systemoutprintln(name +"正在吃东西");}}//子类继承父类class Dog extends Animal {public Dog(String name) {super(name);}public void bark(){Systemoutprintln(name +"在叫");}}public class InheritancePolymorphism {public static void main(String args) {Animal animal = new Dog("小黑");animaleat();//向下转型为 Dog 类型调用 bark 方法if (animal instanceof Dog) {Dog dog =(Dog) animal;dogbark();}}}```抽象类与接口:```java//抽象类abstract class Shape {abstract void draw();}//实现抽象类的子类class Circle extends Shape {@Overridevoid draw(){Systemoutprintln("画一个圆");}}//接口interface Moveable {void move();}//实现接口的类class Car implements Moveable {@Overridepublic void move(){Systemoutprintln("汽车在移动");}}public class AbstractInterfaceExample {public static void main(String args) {Shape shape = new Circle();shapedraw();Moveable car = new Car();carmove();}}```3、 Java 常用类库应用String 类与字符串操作:```javapublic class StringOperation {public static void main(String args) {String str1 ="Hello, ";String str2 ="World!";String str3 = str1 + str2;Systemoutprintln(str3);int length = str3length();Systemoutprintln("字符串长度:"+ length);char charAt = str3charAt(5);Systemoutprintln("第 5 个字符:"+ charAt);boolean contains = str3contains("World");Systemoutprintln("是否包含 World:"+ contains);}}```集合框架(ArrayList、HashMap):```javaimport javautilArrayList;import javautilHashMap;import javautilMap;public class CollectionFramework {public static void main(String args) {// ArrayListArrayList<String> names = new ArrayList<>();namesadd("张三");namesadd("李四");namesadd("王五");for (String name : names) {Systemoutprintln(name);}// HashMapHashMap<String, Integer> ages = new HashMap<>();agesput("张三", 20);agesput("李四", 25);agesput("王五", 30);for (MapEntry<String, Integer> entry : agesentrySet()){Systemoutprintln(entrygetKey()+"的年龄是" +entrygetValue());}}}```文件输入输出(File、FileReader、FileWriter):```javaimport javaioFile;import javaioFileReader;import javaioFileWriter;import javaioIOException;public class FileIOExample {public static void main(String args) {//写入文件try (FileWriter writer = new FileWriter("outputtxt")){writerwrite("这是写入文件的内容");} catch (IOException e) {eprintStackTrace();}//读取文件try (FileReader reader = new FileReader("outputtxt")){int character;while ((character = readerread())!=-1) {Systemoutprint((char) character);}} catch (IOException e) {eprintStackTrace();}}}```五、实验结果与分析1、 Java 基本语法练习变量与数据类型:能够正确定义和使用各种数据类型的变量,并进行基本的运算和输出。
北邮编程实验报告

实验名称:编程基础实验实验日期:2023年X月X日实验地点:北邮计算机实验室实验指导教师:XXX老师实验目的:1. 熟悉编程环境,掌握基本的编程技能。
2. 理解编程的基本概念和语法规则。
3. 培养逻辑思维和问题解决能力。
实验内容:本次实验主要涉及以下几个方面:1. 编程环境搭建2. 基本语法学习3. 编程实践实验步骤:一、编程环境搭建1. 安装编程软件:首先,在北邮计算机实验室的计算机上安装了Visual Studio Code,这是一个功能强大的代码编辑器,可以支持多种编程语言。
2. 配置环境变量:为了方便调用编程软件,我们将环境变量设置好,使得在命令行中输入软件名称即可启动。
二、基本语法学习1. 数据类型:学习了整型、浮点型、字符型等基本数据类型,并掌握了它们的特点和适用场景。
2. 运算符:了解了算术运算符、关系运算符、逻辑运算符等,并学会了如何使用它们进行简单的计算和判断。
3. 控制语句:学习了if-else语句、for循环、while循环等,掌握了如何控制程序的执行流程。
4. 函数:了解了函数的定义、调用和参数传递,学会了如何封装代码,提高代码的可读性和可重用性。
三、编程实践1. 编写计算器程序:根据所学知识,编写了一个简单的计算器程序,实现了加减乘除等基本运算。
2. 编写排序算法:学习了冒泡排序、选择排序、插入排序等基本排序算法,并实现了它们的代码。
3. 编写学生信息管理系统:根据实际需求,设计并实现了一个学生信息管理系统,包括添加、删除、修改和查询学生信息等功能。
实验结果:通过本次实验,我成功完成了以下任务:1. 熟悉了编程环境,掌握了基本的编程技能。
2. 理解了编程的基本概念和语法规则。
3. 培养了逻辑思维和问题解决能力。
实验总结:1. 编程环境搭建:在北邮计算机实验室,我成功安装了Visual Studio Code编程软件,并配置了环境变量。
2. 基本语法学习:通过学习,我掌握了数据类型、运算符、控制语句和函数等基本语法,为后续编程实践打下了基础。
java数据结构lab

实验报告二线性表班级 2013055 姓名:学号: 20133732 专业:计算机科学与技术一、实验目的:(1)理解线性表的逻辑结构、两种存储结构和数据操作;(2)应用顺序表的基本算法实现集合A=AUB算法,应用顺序表的基本算法实现两有序顺序表的归并算法;(3)掌握单链表的遍历、插入和删除等操作算法,实现多项式相加。
二、实验内容:1、设有线性表 LA=(3,5,8,11)和 LB=(2,6,8,9,11,15,20);①若LA和LB分别表示两个集合A和B,求新集合A=A U B(‘并’操作,相同元素不保留);预测输出:LA=(3,5,8,11,2,6,9,15,20)实现代码:package homework2;顺序存储:public Object[] element;public int len;public SeqList(T[] ele){this.element=new Object[ele.length];element=ele;this.len=element.length;}public SeqList(){this(null);}public void append(SeqList<T> list){Object[] temp=this.element;this.element=new Object[this.len+list.len];for(int i=0;i<temp.length;i++){element[i]=temp[i];}for(int j=this.len,k=0;j<this.len+list.len;j++,k++){element[j]=list.element[k];}}}public class SeqCombine {public static void main(String args[]){Integer []a={3,5,8,11};Integer []b={2,6,8,9,11,15,20};SeqList<Integer> A=new SeqList<Integer>(a);SeqList<Integer> B=new SeqList<Integer>(b);A.append(B);for(int i=0;i<=A.element.length-1;i++){System.out.print(A.element[i]+",");}}}链式存储使用尾节点public class Node<T>{T data;Node<T> next;Node(T data,Node<T> next){this.data=data;this.next=next;}Node(){this(null,null);}}public class SinglyLinkedList<T>{public Node<T> head;public Node<T> rear;public SinglyLinkedList(){this.head=new Node<T>();this.rear=new Node<T>();}public SinglyLinkedList(T[] element){this();rear=this.head;for(int i=0;i<element.length;i++){rear.next=(Node<T>)new Node<T>(element[i],null);rear=rear.next;}}}public class Combine{public static void main(String args[]){Integer []a={3,5,8,11};Integer []b={2,6,8,9,11,15,20};SinglyLinkedList<Integer> A=new SinglyLinkedList<Integer>(a);SinglyLinkedList<Integer> B=new SinglyLinkedList<Integer>(b);A.rear.next=B.head.next;Node<Integer> p=A.head.next;while(p!=null){System.out.print(p.data+",");p=p.next;}}}不用尾节点。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Introdu
Course Cod
1. In a Jav or more
This pro
i) Mo
Your pr ii) Ca iii) Ca pro a.2. Write a the com stateme
the com uctory de: EBU4201va applicatio e String pa ogram outpu odify file Te java T rogram shou all the progra all the progra ogram call? .christie a Java progra mmand line ents or a swi mmand line to
Java P 1
n’s main()arameters. C uts the follow estArgs.j TestArgs ld be named am you just w
am again wit
For examp e . Try this wi am called We and prints o itch statem o an integer:
rogram Lab She method, St onsider the f wing when ca ava so that,Agatha C TestArgs wrote, Test th your own d ple, call the ith your deta eekDayCon out the corre ent. The foll mming eet 1: Jav tring[] a following Jav alled with ja , when called Christie s.java .
tArgs.java details. Wha e program w ails . Why do nverter th esponding da lowing line o Sch a Basics
args indica va program:
ava TestA d with 14213118a , with your at happens if with java you think yo hat reads an i ay of the we of code will c hool of Ele and Com ates that this Args howdy 8 1406756r own details you omit yo TestArgs ou got the res integer value eek. You ma convert the S ectronic En mputer Scie s method can dy : 601 it output .
our student nu Agatha sults you did e between 1ay use eithe String valu ngineering ence n take in one ts:
umber in the Christie d?
and 7 from er if…else ue read from e e e m e m
int weekDay = Integer.parseInt(args[0]);
Therefore, calling the program as follows:
java WeekDayConverter 4
will output:
The 4th day of the week is Thursday.
3. Write a program to calculate your BMI and give weight status. Body Mass Index (BMI) is an internationally used measurement to check if you have a healthy weight for your height. The metric BMI formula accepts weight in kilograms and height in metres, as follows:
BMI = weight(kg)/height 2(m 2)
BMI Weight Status categories’ table: BMI range – kg/m 2 Category
< 18.5
Underweight 18.5 – 24.9
Normal 25 – 29.9
Overweight ≥ 30 Obese
Use the command line arguments to give weight in kilograms and height in centimetres. For example:
java BMICalculator 80 175
should output:
Your weight: 80 kg
Your height: 1.75 m
Your BMI: 26.12
You are in the Overweight range.
Hint : The data you read from the command line argument is of type String , and to convert a String to an int , you must use the Integer.parseInt()
method; e.g. int anInt = Integer.parseInt(aString);
4. Below is a Java program that uses a while loop:
i) Write a new version of the program above using a do-while loop and name its file
DoublingNumbers1.java .
ii) Write a new version of the program above using a for loop and name its file
DoublingNumbers2.java .
Note : The three programs must have the same output.。