自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(33)
  • 问答 (2)
  • 收藏
  • 关注

原创 欢迎使用CSDN-markdown编辑

#include <iostream>using namespace std;bool isLeapYear(int year) { return (((year % 4 == 0)&&(year % 100 != 0))||(year % 400 == 0));}int isMonthThirty(int month) { int fla...

2019-08-30 17:30:29 139

原创 c language %p

#include <stdio.h> 2 3 int main() { 4 int a[3][4]; 5 6 printf("a = %p\n",a); 7 printf("a[0] = %p\n",a[0]); 8 printf("a[0][0] = %p\n",a[0][0]); 9 ...

2019-08-17 16:33:24 160

原创 win10下,在谷歌浏览器中安装插件vimium

win10下,在谷歌浏览器中安装插件vimium过程安装git百度搜索git便可以找到git的官网(https://git-scm.com/),点击"Download 2.22.0 for Windows"下载即可。安装过程按照默认提示。安装node打开官网(https://nodejs.org/en/),选择下载"Recommended For Most Users"。安装过程...

2019-08-15 00:44:26 697

原创 Programming Course on Matrix

Programming Course on MatrixPlease visit GitHub to see more codeMatrixhttps://github.com/Hing1/ProgrammingCourse

2019-05-28 15:12:27 184

原创 与非门的通用性

与非门的通用性若当输入均为高电平(1),则输出为低电平(0);若输入中至少有一个为低电平(0),则输出为高电平(1)。与非门可以看作是与门和非门的叠加。与非门构成非门与非门构成或门X = A + B = ~ ( ~A · ~B)与非门构成与门X = A · B = ~~ ( A · B)...

2019-05-11 15:50:09 3872

原创 [Inheritance]anonymous

DescriptionAnonymous has met a problem.To solve this problem, he has to write 4 classes.These classes are point, vector, circle and todo. point / \ / \ vector ...

2019-04-30 15:39:00 178

原创 [Inheritance]Virtual class

Description设计一个基类base,包含姓名和年龄私有数据成员以及相关的成员函数,由它派生出领导类leader,包含职务和部门私有数据成员以及相关的成员函数,再由base派生出工程师类engineer,包含职称和专业私有成员以及相关的成员函数。然后由leader和engineer类派生出主任工程类chairman,采用一些数据测试。基类:class base{char *na...

2019-04-30 15:35:50 541

原创 [Inheritance]Constructor chains

DescriptionThere are four classes A, B, C and D. They all have the same form as follows:class X{public: X() { cout << "In X()" << endl; } ~X() { cout << "In ~X()" << ...

2019-04-30 15:34:07 194

原创 [Classes and Objects]Job Manager

DescriptionIn this assignment, you are required to finish two classes’ definition according to their declaration respectly..1. Two basic concepts are needed before you begin to code: 1. Singleton, 2...

2019-04-30 15:30:39 260

原创 [Operator Overloading]Big Integer Add & Subtract

This is an easy big integer. Your task is to finish the class big integer:Tips:size_ means the size of the big integerfriend function should have been declared outside;when you declare the friend ...

2019-04-30 11:23:07 230

原创 [Operator Overloading]The Date class (version 3)

DescriptionImplement the operator +=, -=, +, -, in the class Dateclass Date{public: Date(int y=0, int m=1, int d=1); static bool leapyear(int year); int getYear() const; int getMonth() c...

2019-04-24 08:47:10 235

原创 [Inheritance]Discount Books (eden)

Hateful Ou is working for a bookstore, and now the boss tell him to make a plan about discount books.Books will be discounted when the salse is more than minQty.Hateful Ou is so stupid that he want ...

2019-04-23 14:50:29 347

原创 [Interitance] Single Interitance

实现一个简单的单重继承的程序,该程序由两个类构成:Time、ExtTime,其中后者是前者的派生类,具体描述信息如下所示:// 基类class Time { public: void Set(int hours, int minutes, int seconds); void Increment(); // 注意“进位” void Write() const; // 已实现...

2019-04-23 13:13:07 321

原创 [Inheritance] Multiple inheritance

Description写作和赛车是韩少的两大最爱,但在生活的不同时期还是要有所取舍。韩少的原则是:周末:写作优先; 周内:赛车优先;这些可以提现在Weekend和Workday的对象构造中,类继承关系如下:Racing Writing \ / Weekend/Workday 其中Racing和Wri...

2019-04-23 12:22:49 176

原创 [Inheritance]Inheritance

TaskFinish header file of the Inheritance class.HintsAll function is finished.You need write inheritance relation between 5 class so that it can print right message.A SampleInput6590Output...

2019-04-23 12:18:33 359

原创 [Inheritance]Employee

要求编写一个简单的人员信息管理程序,具体要求如下:(1)程序涉及到五个类,分别是Employee,Technician,Salesman,Manager,Salesmanager。这五个类的关系为:Employee是顶层父类,Technician,Salesman,Manager是employee的子类,Salesmanager是Salesman,Manager的子类。(2)Employee具...

2019-04-23 12:14:15 390

原创 Catalogue

Maximum in ArraySwap ValuesThe stack classFunction printStackMaxValue template functiontypename! typename!The Max of a sequenceSearch a value9运算符重载:Point ComparisonComp...

2019-04-20 21:27:41 163

原创 [Classes and Objects]D&A Static Linked List

IntroductionKnowledge points: encapsulation, copy constructor, linked list algorithms, debug methods(GDB or IDE or output debug).In this Lab, again, you are going to implement a class named static l...

2019-04-20 20:38:15 258

原创 [Classes and Objects]IntegerSet

IntroductionCreate class IntegerSet for which each object can hold integers in the range 0 through 100.A set is represented internally as an array of ones and zeros.Array element a[ i ] is 1 if int...

2019-04-20 00:59:52 763

原创 Fill the classes about deep copy

DescriptionA Person class should be implemented, which has two member variables: id, birthDate. You need to add a copy constructor to the Person class, which should perform deep copy.Note : The foll...

2019-04-20 00:52:40 298

原创 [Inheritance]Rectangle

Description1、定义基类 Point,使其能够初始化坐标(x,y),移动坐标,返回坐标2、定义派生类 Rectangle,有成员变量 width、high;并且有成员函数,使其能够返回矩形相关属性:宽、高、面积基类:class Point{ int x,y;public: Point(int x,int y); void Move(int x,in...

2019-04-20 00:50:12 344

原创 [Inheritance]Animal & Human

DescriptionFirst, write a base class animal in animal.h, which has 2 attributes: string _species and int _eyes. This class should also have a method: void printeyes(), which can printf “species has _...

2019-04-20 00:47:27 361

原创 [Inheritance]The Triangle Class

The Triangle ClassDescriptionDesign a class named Triangle that extends GeometricObject class.The class contains:Three double data fields named side1, side2, and side3 with default values 1.0 to d...

2019-04-20 00:44:48 684

原创 [Inheritance]猫科动物和老虎

猫科动物和老虎Description下面是不完整的继承类定义,class Cat{ int data;public: Cat();};class Tiger : public Cat{ int data;public: Tiger(int);};试完成其定义(你可以根据需要增加必要的构造函数和析构函数),使得主函数main运行后能得到其后结...

2019-04-20 00:42:15 713

原创 [Classes and Objects]Alipay System 1 user

IntroductionYou must have heard alipay(“Zhi Fu Bao” for Chinese). Now in this topic, we will do a series of practice to develop such a online payment system. This Time we are going to focus on the co...

2019-04-14 08:56:47 267

原创 [Operator Overloading]The Complex class

The Complex classDescriptionImplement the Complex class:class Complex{ double re; //real part of a complex number double im; //imaginary part of a complex numberpublic: double real() const ...

2019-04-14 08:53:13 279

翻译 [Operator Overloading]Static Member

Static MemberDescription/*测试static member*/完成类Int,可以加入你觉得需要的member value or function.class Int{ int data;public: Int(int n); //将n的值赋给data};使得函数f()输出为num 1 is odd? 1num 2 is odd? 0...

2019-04-14 08:50:31 217

翻译 [Operator Overloading]Calculate the Sum

Calculate the SumDescription完成类MyClass的定义,class MyClass{ int data;public: MyClass(int d); //将d的值赋给data, d值大于0 void printData(); //求和1+2+3+...+data,函数返回该和值 int sumIt(); }...

2019-04-14 08:48:05 185

翻译 [Operator Overloading]Doubly Linked List

IntroductionWe are going to design a link list class in c++. Again, the knowledge of pointer in c++ is widely used this time and you have to focus when you are coding.KnowledgeThis time, you are go...

2019-04-14 08:45:23 318

翻译 [Operator Overloading]Simulate std::string

Implement the class String with given header, you can also make it like std::string!member function ‘compare()’ returns -1 for <, 0 for ==, 1 for >.Any question see STL references.From: 范子垚S...

2019-04-14 08:41:25 285

翻译 [Operator Overloading]Set Operations

You need finish function.Require knowledge:Know set operations:includeintersection(交集)union(并集)the complement of B with respect to A(B对A的补)symmetric difference(对称差)copy constructor...

2019-04-14 08:38:53 264

原创 [Operator Overloading]简单的Matrix运算

Task完善Matrix类的定义,实现简单的Matrix运算,类的定义,main函数已给出,你需要编写Matrix.h文件实现具体函数,记得包含类的定义。Detailclass Matrix //定义Matrix类 {public: Matrix(); //默认构造函数 ~Mat...

2019-04-09 13:41:13 330

原创 [Operator Overloading]Fraction

DescriptionIn this assignment you are required to complete a class for fractions.It stores the numerator and the denominator, with the lowest terms.It is able to communicate with iostreams by the o...

2019-04-09 13:34:05 547

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除