- 博客(231)
- 资源 (4)
- 收藏
- 关注
原创 设计模式,工厂模式+状态模式+策略模式,架构设计
系统代码设计,代码重构,消息队列,MQ接收消息代码重构,面试题,Java面试题,RabbitMQ,Kafka
2022-07-31 11:46:27 364
原创 Mysql面试题:一条SQL语句查询出每个班的及格人数和不及格人数
用一条SQL语句查询出每个班的及格人数和不及格人数,格式为:class,及格人数,不及格人数(score>=60为及格)
2022-06-28 18:11:14 5404
原创 输出随机数1到511*511序列
编写一个控制台应用,实现输出一个从1开始到511*511长度的随机数序列。using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace RAndom{ class Program { static void Main(string.........
2014-09-28 23:02:19 1164
原创 计算物体密度
编写C#控制台应用程序,对第2题进行扩展,从PhysicalObject中派生出移动物体类MovingObject,在其中增加物体的速度信息,并实现物体动量和动能的计算。 提示:动量计算公式p=m*v(物体质量*速度) 动能计算公式p=m*v*v/2using System;using System.Collections.Generic;using System.........
2014-09-28 23:00:37 1083
原创 猜数字游戏
********5.随机给出一个0至99(包括0和99)之间的数字,然后让你猜是什么数字。你可以随便猜一个数字,游戏会提示太大还是太小,从而缩小结果范围。经过几次猜测与提示后,最终推出答案。 提示:用Random类的Next方法产生数据using System;using System.Collections.Generic;using System.Linq;using Syst
2014-09-28 22:56:41 955
原创 字符串的各种操作
3.编写一个控制台应用。输入一组整数,输出所有的奇数。 提示:使用字符串的Split函数4.输入一个由若干字符组成的字符串,输出其中的大写字母、小写字母、数字和其他字符的个数。 提示:使用ToCharArray函数using System;using System.Collections.Generic;using System.Linq;using System.Text;
2014-09-28 22:54:30 763
原创 将字符串倒序
.继续在该类中编写一下方法,名称为Reconvert,参数一个,但可以是字符串、整数、单精度、双精度,方法功能返回参数的逆序。如Reconvert(6221982)返回值为2891226。提示:将string转换为Char char[] c=strS.ToCharArray()using System;using System.Collections.Generic;usi
2014-09-28 22:51:59 863
原创 求参数出现的次数
编写一个名称为MyClass一个类,在该类中编写一个方法,名称为CountChar,返回值为整型,参数两个,第一个参数可以是字符串、整数、单精度、双精度,第二个参数为字符,方法功能返回第二个参数在第一个参数中出现次数。如CountChar("6221982",'2')返回值为3。using System;using System.Collections.Generic;using Sys
2014-09-28 22:49:42 901
原创 工资类
在员工管理系统中,有普通员工,经理,董事三种角色,公司所有的员工都有员工Id,员工名字,员工基本薪水(salary),请假天数(days);它们的区别是计算工资方式不一样。具体工资计算办法:所有人工资扣除部分:如果请假小于5天,基本工资发75%,大于5天,基本工资发50% ;A、普通员工工资=基本工资+住房补贴(基本工资的0.1)+交通补贴(基本工资的0.3);B、经理的工资=基本工资
2014-09-28 22:41:32 1217
原创 输入学号和姓名,对不存在的学号加到hashtable类的实例中,对存在学号给出提示
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Collections;namespace ConsoleApplication1{ class Program { static void M
2014-09-18 09:25:20 1545
原创 图书类
public class Book { private String bookId; private String bookName; private String author; private String publisher; private String price; public
2014-09-18 08:46:56 2330
原创 简单四则运算
class Arith{ private int num1,num2; Arith(){ } Arith (int a,int b) { this.num1=a; this.num2=b; } public int getNum1()
2014-09-18 08:42:57 829
原创 猜数字游戏
import java.util.Random;import java.util.Scanner;public class Number { /** * @param args */ public static void main(String[] args) { // TODO Auto-ge nerated method stub Sys
2014-09-18 08:42:09 760
原创 判断字符串中A出现的个数,及单词的个数
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Stringing{ class Program { static void Main(string[] args) {
2014-09-18 08:40:47 1436
原创 求两个数之间的素数+一个数的各位之和+判断回文数
#include #include #includeusing namespace std;int main(){ int a,k,m=0,c=1,n=0; bool prime; cout<<"please input n"<<endl; cin>>n; cout << "the prime is:" << endl; for(c=1;
2014-09-04 22:00:38 1179
原创 判断是否为闰年
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace qqqqqq{ class Program { static void Main(string[] args) {
2014-09-04 21:58:16 759
原创 判断是否为回文数+求一个序列的第30个数
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace _11111{ class Program { static void Main(string[] args) { string c
2014-09-04 21:56:16 844
原创 求水仙花数
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace p1{ class Program { static void Main(string[] args) { int a=0,b=0,
2014-09-04 21:52:33 1031
原创 大一下半年感想(计划+实施)
上机考试结束到现在。才愿意提笔写总结。自己下半年的学习不如上半年好,总结了一下。 第一,明显觉得自己学习的精力没有上半年多。学生会的事情下半年也多了很多。让我忙的没有了计划,也懒得给自己安排计划了。所以当时很犹豫自己要不要放弃这么多扑在学生会上。这几天在家也想了想,想想自己上大学之初的计划和目标(那时候觉得自己很缺乏交际能力,处理临时事情的实践,虽然想法很多,但是实践很少。所以很
2014-07-20 21:21:41 1663 2
原创 oj平台做题汇总3
//定义一个Teacher(教师)类(教师号,姓名,性别,薪金)和一个Student(学生)类//(学号,姓名,性别,成绩),二者有一部分数据成员是相同的,num(号码),name(姓名),sex(性别)。//编写程序,将一个Student对象(学生)转换为Teacher(教师)类,只将以上3个相同的数据成员移植过去。//可以设想为: 一位学生大学毕业了,留校担任教师,他原有的部分数据对现在
2014-07-13 21:31:45 1318
原创 oj平台做题汇总
//定义一个矩形类,数据成员包括左下角和右上角坐标,定义的成员函数包括必要的构造函数、//输入坐标的函数,实现矩形加法,以及计算并输出矩形面积的函数。要求使用提示中给出的测试函数并不得改动。// 两个矩形相加的规则是:决定矩形的对应坐标分别相加,如// 左下角(1,2),右上角(3,4)的矩形,与// 左下角(2,3),右上角(4,5)的矩形相加,得到的矩形是// 左
2014-07-13 21:22:29 1439
原创 oj平台做题汇总
//从前有一个王子,他喜欢上了邻国的一个公主。终于有一天他向公主表白了,公主答应了他。//在婚礼那天,可恶的魔王来了,他抢走了公主。王子很愤怒(╰_╯)#,他决定打上魔宫救回公主。//临走那天,巫师给了他一本魔法书,让他可以看到自己与敌人的差距,来促使他不断进步。//当王子可以打败怪物时魔法书显示:Trial!,当打不败时显示:You need more power!//怪物的等级比较低,
2014-07-13 21:08:33 790
原创 16.3类更改出生年月日
#include #include using namespace std;class BirthDate{public: BirthDate(int,int,int); void display(); void setbirthday(int,int,int);private: int year; int month; int day;
2014-06-10 22:29:12 778
原创 16.2
/* C++ДњТы */#include using namespace std;class Student{public: void get_value() { cin>>num>>name>>sex; } void display( ) { cout<<"num: "<<num<<endl; c
2014-06-10 22:22:05 750
原创 16.1
#include using namespace std;class Matrix{public: Matrix(); friend Matrix operator+(Matrix &,Matrix &); friend ostream& operator<<(ostream&,Matrix&); friend istream& operator>
2014-06-10 22:17:51 694
原创 15.3.1
#include #include#include#includeusing namespace std;class Word{public: void set(string e,string c,string w); int compare(string k); string getchinese(); string getword_class();
2014-06-10 22:12:45 654
国家电子健康卡建设指南(2.5);居民健康卡跨域主索引系统技术指引
2020-12-01
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人