C++课堂作业(2)】的更多相关文章

计算器的第一步,至今还记记忆犹新,本次的课堂作业,便是那个框架.闲话少叙,代码如下传送门: Main.cpp #include "stdafx.h" #include<iostream> #include"Circle_S.h" using namespace std; int main() { Circle_S SQ; //调用类 double r, S; cin >> r; S = SQ.js(r); cout << &quo…
20155213 第十二周课堂作业MySort 作业要求 模拟实现Linux下Sort -t : -k 2的功能 参考 Sort的实现 提交码云链接和代码运行截图 初始代码 1 import java.util.*; 2 3 public class MySort1 { 4 public static void main(String [] args) { 5 String [] toSort = {"aaa:10:1:1", 6 "ccc:30:3:4", 7 &…
课堂作业-Bag类的实现 要求: 代码运行在命令行中,路径要体现学号信息,IDEA中,伪代码要体现个人学号信息 参见Bag的UML图,用Java继承BagInterface实现泛型类Bag,并对方法进行单元测试(JUnit),测试要涵盖正常.异常情况.边界情况. 实验思路 0.编写接口 1.编写伪代码 2.实现接口 3.使用junit进行测试 代码编写的主要思想分析 使用数组实现Bag类,达到可增可删可判断是否为空等等. 0 . 定义一个Object类型的数组,其长度为0 1 . 判断是否为空时…
前言 本文章只是单纯记录课堂老师布置的课堂作业代码,题目都比较简单,所以没有写解题思路,相信大家都能理解,当然其中有的解法和代码不是最优的,当时只是为了完成题目,后来也懒得改了,如果有不恰当或者不正确的地方,欢迎指出 备注:有的忘记记录题目信息了,有的题目直接在作业系统里面提交了,请见谅,将就着看吧 1. 查看代码 package java_works; import java.util.Scanner; public class java_10001 { public static void…
今天的Java课堂留下了一个作业:使用Eclipse编写一个程序,使输入的两个数进行加和,并且输出他们的和.对于这个题目,我们首先可以把它分解成为三个不同的小步骤 第一步就是输入这两个数,因为我们无需输出这两个输入的数,所以这一步可以与第二步加和同时进行.第二步是对输入的数进行所以我们直接使用输入args进行加和,即: a = a +Integer.parseInt(arg).这样我们便求出了输入的数字的和.第三步就是通过System.out.println()进行输出即可. 具体的流程图为:…
第一课:简陋的登录框 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>js课程第一课</title> <style> body{padding: 20px;font:16px "微软雅黑";} h3{text-align: center;margin-top: 0;} la…
    日期:2019/3/16 作业:实现命令cat, cp, echo. myecho命令 #include <stdio.h> int main(int argc, char *argv[]) {     int i = 0;     printf("argument count = %d\n", argc);     for (; i < argc; i++)         printf("%s\n", argv[i]);     ret…
The 1st classwork of the C++ program 题目: Create a program that asks for the radius of a circle and prints the area of that circle, using cin and cout. The whole program should be divided into two source files (.cpp). Hand in the source files and the…
c++第一次课堂作业点这里 题目要求:输入半径,计算圆的面积,在调用外部函数,无需使用类.…
1.问题描述: Create a program that asks for the radius of a circle and prints the area of that circle, using cin and cout. The whole program should be divided into two source files (.cpp). Hand in the source files and the head files which you create. 2.解题…