screen的复数

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了screen的复数相关的知识,希望对你有一定的参考价值。

参考技术A

screen的复数是:screens。

第三人称单数: screens;
过去式: screened;
过去分词: screened;
现在分词: screening;
易混淆的单词: Screen;

screen 屏风,屏障,纱窗,屏幕,银屏,电影,筛查,检查;

来自中古英语 scren,挡风屏,炉挡,火炉栏,来自 Proto-Germanic*skirmiz,挡开,屏障,保护, 来自 PIE*sker,砍,切,分开,词源同 shear,share.引申诸相关词义及比喻义银屏,电影等。

screen 用法和例句:

The screen becomes part of our identity .

屏幕成了我们自我的一部分。

The shuttle 's control panel has a touch screen .

shuttle的控制面板上有一块触摸屏。

At the cinema they can enjoy the big screen and the surround sound.

在电影院里,他们能够享受到大银幕和环绕身历声。

It has an absolutely superb screen.

它的萤幕无疑是棒极了。

A digital clock ticks loudly on the screen.

荧屏上,数字时钟响亮敲起。

用java 编写一个复数类

2)完成以下的操作:初始化复数、求其绝对值、复数的加、减、乘、除、乘方、自加、自减等。
提示:
1)建立数据类、复数类
2)数据、复数信息的初始化
3)复数信息的输出
4)求复数的绝对值
5)实现复数的加、减、乘、除、乘方、自加、自减等运算

参考技术A public class Complex

protected int a;

protected int b;

public Complex(int a, int b)
this.a = a;
this.b = b;


public String toString()
return this.a + " + " + this.b + "i";


public static Complex addition(Complex complex1, Complex complex2)
int a = complex1.a + complex2.a;
int b = complex1.b + complex2.b;
return new Complex(a, b);


public static Complex subtract(Complex complex1, Complex complex2)
int a = complex1.a - complex2.a;
int b = complex1.b - complex2.b;
return new Complex(a, b);


public static Complex multiplication(Complex complex1, Complex complex2)
int a = complex1.a * complex2.a - complex1.b * complex2.b;
int b = complex1.b * complex2.a + complex1.a * complex2.b;
return new Complex(a, b);


public static Complex division(Complex complex1, Complex complex2) throws Exception
if (complex2.a == 0)
throw new Exception("complex2.a is 0");

if (complex2.b == 0)
throw new Exception("complex2.b is 0");

int a = (complex1.a * complex2.a + complex1.b * complex2.b) / (complex2.a * complex2.a + complex2.b * complex2.b);
int b = (complex1.b * complex2.a - complex1.a * complex2.b) / (complex2.a * complex2.a + complex2.b * complex2.b);
return new Complex(a, b);



//测试用的类
public class ComplexTest

public static void main(String[] args) throws Exception
// TODO Auto-generated method stub
Complex complex1 = new Complex(1, 2);
Complex complex2 = new Complex(3, 4);
System.out.println(complex1 + " + " + complex2 + " = " + Complex.addition(complex1, complex2));
System.out.println(complex1 + " - " + complex2 + " = " + Complex.subtract(complex1, complex2));
System.out.println(complex1 + " x " + complex2 + " = " + Complex.multiplication(complex1, complex2));
System.out.println(complex1 + " / " + complex2 + " = " + Complex.division(complex1, complex2));

追问

你这程序 包括以上的要求吗? 有没有乘方 复数的绝对值

追答

只有加 减 乘 除, 其它的功能和这些类似。

追问

能不能给我完整下 哥们 我们交作业 老师还问里 麻烦你了 。。。谢了。。。

追答

//绝对值
public static double abs(Complex complex)
return (Math.sqrt(complex.a * complex.a + complex.b * complex.b));


//乘方
public static Complex cPow(Complex complex, int n)

double r, j;

r = Math.sqrt(complex.a * complex.a + complex.b * complex.b);
j = Math.atan(complex.b / complex.a);

double a = Math.pow(r, n) * Math.cos(n * j);
double b = Math.pow(r, n) * Math.sin(n * j);

return new Complex(a, b);


//自加
public static Complex addSelf(Complex complex)
return new Complex(++complex.a, ++complex.b);


//自减
public static Complex minSelf(Complex complex)
return new Complex(--complex.a, --complex.b);

以上方法都放到类Complex里面。还有把类Complex里面的int定义的变量全部改成double。

//测试用的类:
...
System.out.println(complex1 + " 绝对值: " + Complex.abs(complex1));
System.out.println(complex2 + " 绝对值: " + Complex.abs(complex2));
System.out.println(complex1 + " 乘方: " + Complex.cPow(complex1, 3));
System.out.println(complex1 + " 自加: " + Complex.addSelf(complex1));
System.out.println(complex2 + " 自减: " + Complex.minSelf(complex2));

参考技术B 这哥们回答的不错!

以上是关于screen的复数的主要内容,如果未能解决你的问题,请参考以下文章

screen会话建立

screen是耳机吗

screen命令的基本用法

linux下screen如何显示当前处在哪个screen

screen对象

screen:多重视窗管理程序