摘要: 1.三个界面,界面1点击按钮使用显式意图开启界面2.界面2点击按钮隐式意图开启界面3 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="match_par 阅读全文
posted @ 2021-10-09 15:22 马瑞彬 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 1、返回键实现对话框弹出是否退出应用程序 package itcast.cn; import android.app.AlertDialog; import android.content.DialogInterface; import android.os.Bundle; import andro 阅读全文
posted @ 2021-09-26 11:09 马瑞彬 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 1.创建3个界面 第一个界面有3个button <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="htt 阅读全文
posted @ 2021-09-12 13:13 马瑞彬 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 作业1:安装环境,截图编程界面,截图运行界面 作业2:九宫格 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns 阅读全文
posted @ 2021-09-12 13:09 马瑞彬 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 4、 Cola公司的雇员分为以下若干类:(知识点:多态) [必做 题] 4.1 ColaEmployee :这是所有员工总的父类,属性:员工的 姓名,员工的生日月份。方法:getSalary(int month) 根据参数 月份来确定工资,如果该月员工过生日,则公司会额外奖励 100 元。 4.2 阅读全文
posted @ 2021-06-15 15:06 马瑞彬 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 设计2个类,要求如下:(知识点:类的继承 方法的覆盖) [必做题] 2..1 定义一个汽车类Vehicle, 2.1.1 属性包括:汽车品牌brand(String类型)、颜色color(String类型)和速度speed(double类型)。2.1.2 至少提供一个有参的构造方法(要求品牌和颜色可 阅读全文
posted @ 2021-06-07 17:30 马瑞彬 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 1、定义一个点类Point,包含两个成员变量x,y分别表示x和y坐标,2个构造器Point( )和Point(int x0,int y0),以及一个movePoint(int dx,int dy)方法实现点的位置移动,创建两个Point对象p1、p2,分别调用movePoint方法后,打印p1和p2 阅读全文
posted @ 2021-05-24 16:46 马瑞彬 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 1、编写一个方法,实现冒泡排序(由小到大),并调用该方法 package mrb; public class Asd { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated meth 阅读全文
posted @ 2021-05-11 18:12 马瑞彬 阅读(53) 评论(0) 推荐(0) 编辑
摘要: 1、编写一个简单程序,要求数组长度为5,分别赋值10,20,30,40,50,在控制台输出该数组的值。(知识点:数组定义和创建、一维数组初始化)[必做题]? package mrb; public class Mrb { /** * @param args */ public static void 阅读全文
posted @ 2021-04-26 16:24 马瑞彬 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 1、编写一个简单程序,要求数组长度为5,静态赋值10,20,30,40,50,在控制台输出该数组的值。 package mrb; public class Mrb { public static void main(String[] args) { // TODO Auto-generated me 阅读全文
posted @ 2021-04-19 17:32 马瑞彬 阅读(51) 评论(0) 推荐(0) 编辑