我怎样才能做到这一点 ... :( [英] How can I do this ... :(

查看:65
本文介绍了我怎样才能做到这一点 ... :(的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用以下大纲实现插入,冒泡和选择的排序技术。进口商须知:



您必须遵循以下大纲。如果你不遵守,你的项目将不会被评分。



a。

Class< Sort Array>

b。属性:字符串< s> ;; //由blankd分隔的整数序列(所有结束空格应由trim()删除;

c.static int [] sA;

//这是一个全局变量,不是解析;它是split()上面提到的字符串属性的结果。

d。构造函数。将是3个构造函数:



i。没有参数的那个://因为用户将通过键盘输入属性,所有积分器中的一行由空格分隔。

ii。一个字符串参数作为属性

iii。数组参数为n整数数组。

e。方法toString显示全局变量sA

f。对属性进行排序并将结果存储到sA的三种方法
。支持项目所需的其他方法bf



我尝试过:



class SortArray {

字符串数字;

static int [] sA;

SortArray(){

}

String SortArray(String num){

numbers = num.trim();

返回数字;

}

int [] SortArray(int [] n){

sA = n;

retunrn sA;

}

Implement the sorting techniques Insertion, Bubble,and Selection using the following outline. Importnt notes:

You MUST follow the following outline. Your project will not be graded ifyou don’t follow.

a.
Class <Sort Array>
b. Attribute: String <s>;//sequence of intergers separated by blankd(all ending blanks should be removed by trim();
c. static int[] sA ;
//this is a global variable, NOT anattribute; it is the outcome of split() the string attribute mentionned above.
d. Constructors. The will be 3 constructors:

i. The one without parameter: //because users will enter the attribute via keyboard one line of all integrs separated by blanks.
ii. The one with a string parameter as the attribute
iii. The one with array parameter as n array of integers.
e. The method toString to display the global variable sA
f. Three methods to sort the attribute and store the result to sA
g.Other methods needed to support items b-f

What I have tried:

class SortArray{
String numbers;
static int[] sA;
SortArray(){
}
String SortArray(String num){
numbers = num.trim();
return numbers;
}
int[] SortArray(int[] n){
sA = n;
retunrn sA;
}

推荐答案

我们不做你的作业:这是有原因的。它就是为了让你思考你被告知的事情,并试着理解它。它也在那里,以便您的导师可以识别您身体虚弱的区域,并将更多的注意力集中在补救措施上。



亲自尝试,你可能会发现它不是和你想的一样困难!



如果遇到具体问题,请询问相关问题,我们会尽力提供帮助。但是我们不打算为你做这一切!
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!


import java.util.Arrays;

class SortArray{
	String numbers;
	static int[] sA;
	 SortArray(){
	 }
	 String SortArray(String num){
		numbers = num.trim();
		return numbers;
	 }
	int[] SortArray(int[] n){
		sA = n;
		retunrn sA;
	 }



开始我这样做


starting i am doing it


这篇关于我怎样才能做到这一点 ... :(的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆