- 博客(7)
- 收藏
- 关注
原创 2021-11-02
每日100!推箱子2.0!推箱子2.0Run.javapackage com.honghong2;public class Run {public static void main(String[] arge){GameFrame gameFrame = new GameFrame(“推箱子2.0”);gameFrame.setVisible(true);}}GameFream.javapackage com.honghong2;import javax.swing.;import
2021-11-02 00:04:36
126
原创 2021-11-01
每日100! 自引用指针 this//1表示内存地址#include using namespace std;class This {int a;public:This(int aa){a = aa;}void print(){cout << “内存地址:” << this << endl;cout << "a = " << a << endl;}};//2 this->x = x;cl
2021-11-01 00:18:28
108
原创 2021-10-31
每日100!生日快乐!拷贝构造函数Date.h#include#include “string.h”using namespace std;class Date {//没有限定,默认为publicint Month,Day,Yeal;public:Date(int m1, int d1, int y1 ){Month = m1;Day = d1;Yeal = y1;}Date(Date &d){Month = d.Month;Month = d.Day;Month
2021-10-31 02:16:27
115
原创 2021-10-30
每日100! Java、C++继承 特点1:子类可以拥有父类的属性和方法publicprotectd默认的只方法有子类与父类在一个包可以访问当两个类中有多个相同的属性或者方法是时,抽取父类实现代码复用C+H列出类的继承结构2:子类可以有自己的新方法和属性3:子类可以重写父类的方法方法重写 (方法覆盖)子类方法与父类方法具有相同方法声明,不同的方法实现子类方法与父类方法具有相同方法头,不同的方法体注解编译器会处理【重写】@Overide (放到子类上面).
2021-10-30 01:12:26
129
原创 2021-10-29
每日100!银行账户源代码!Test.cpp#include “stdafx.h”#include <stdlib.h>#include"class.h"#include #include “string”using namespace std;int main() {string name;string id;double balance;string password;string address;double min_balance;float money_r
2021-10-29 00:50:17
158
原创 2021-10-28
每日100!package com.honghong2;import javax.swing.;import java.awt.;import java.awt.event.KeyEvent;import java.awt.event.KeyListener;public class TXZ2 { public static void main(String[] args){ //Java窗口类(桌子类) 并起标题 JFrame gameFrame = new JFrame
2021-10-28 00:36:50
98
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人