斯坦福 IT

迷茫:刚过完年,41了。好尴尬的年龄,不上不下的!国内英语专科毕业,带着两个孩子,不知道该去上学还是找工作?一头雾水,好迷茫!该何去何从?

最大赞力
0.00
当前赞力
100.00%
你的意思是说你不知道"for loop"是什么呢,还是不知道循环体内该写什么?

I only know how to write the program with "for loop" to display the letter "I". so I know how to use the "for loop" for very very simply programs. Here is the program for the letter ''I".

public class ASCIIArt {

public static void main(String[] args) {

Scanner userInput = new Scanner(System.in);


System.out.print("Please enter a number to indicate how many stars: \n");

final int MAX_SIZE = 8;
int size = userInput.nextInt();

for (int i = 1; i <= size; i++) {
if (size <=MAX_SIZE){
System.out.println(" *");
}
else{
System.out.println("Invalid entry.");
}
}


How do you use the "for loop" to write the program to display the letter "Z". the height of the letter "Z" changes accordingly when the user enters different numbers.
 
最大赞力
0.00
当前赞力
100.00%
I only know how to write the program with "for loop" to display the letter "I". so I know how to use the "for loop" for very very simply programs. Here is the program for the letter ''I".

public class ASCIIArt {

public static void main(String[] args) {

Scanner userInput = new Scanner(System.in);


System.out.print("Please enter a number to indicate how many stars: \n");

final int MAX_SIZE = 8;
int size = userInput.nextInt();

for (int i = 1; i <= size; i++) {
if (size <=MAX_SIZE){
System.out.println(" *");
}
else{
System.out.println("Invalid entry.");
}
}


How do you use the "for loop" to write the program to display the letter "Z". the height of the letter "Z" changes accordingly when the user enters different numbers.
太难了。。。看不懂。
 
最大赞力
0.00
当前赞力
100.00%
I only know how to write the program with "for loop" to display the letter "I". so I know how to use the "for loop" for very very simply programs. Here is the program for the letter ''I".

public class ASCIIArt {

public static void main(String[] args) {

Scanner userInput = new Scanner(System.in);


System.out.print("Please enter a number to indicate how many stars: \n");

final int MAX_SIZE = 8;
int size = userInput.nextInt();

for (int i = 1; i <= size; i++) {
if (size <=MAX_SIZE){
System.out.println(" *");
}
else{
System.out.println("Invalid entry.");
}
}


How do you use the "for loop" to write the program to display the letter "Z". the height of the letter "Z" changes accordingly when the user enters different numbers.
这个题目里是不是这些字母都是用“*”画出来的?
 
最大赞力
0.00
当前赞力
100.00%
感觉给你出主意学编程的。。。。真的是馊主意。。。41多岁,女的,没有任何基础。。。学编程????

我也感觉编程不容易学。特别是没有一点基础。我发现我们班上那些觉得编程不难的(不是容易,是不难)都是本地高中毕业生。他们在高中的时候就有学编程的了,只不过是不同的编程语言。

楼主有没有想过在health care行业里找职业呢。如果不喜欢护理类的工作(RCA, LPN, RN)等职业,可以考虑下X-ray Tech, Ultrasound Tech, Med. Lab Tech, Med. Lab assistant, Unit clerk...
 
最大赞力
0.00
当前赞力
100.00%
我也感觉编程不容易学。特别是没有一点基础。我发现我们班上那些觉得编程不难的(不是容易,是不难)都是本地高中毕业生。他们在高中的时候就有学编程的了,只不过是不同的编程语言。

楼主有没有想过在health care行业里找职业呢。如果不喜欢护理类的工作(RCA, LPN, RN)等职业,可以考虑下X-ray Tech, Ultrasound Tech, Med. Lab Tech, Med. Lab assistant, Unit clerk...
当时打算学CS还有个原因不用太考虑法语的问题,我也查过health care 行业,感觉法语还是很有必要,需要与人沟通。现在法语也是一大障碍,年龄大了学语言短时间也学不会,而且学过去就忘
 
最大赞力
0.00
当前赞力
100.00%
当时打算学CS还有个原因不用太考虑法语的问题,我也查过health care 行业,感觉法语还是很有必要,需要与人沟通。现在法语也是一大障碍,年龄大了学语言短时间也学不会,而且学过去就忘

IT是个养小不养老的行业,以楼主的年龄不太建议学这个。现在整体经济不景气,会计也不好找工作了。相比之下也就医疗行业还算相对好些。给楼主推荐医疗器械消毒专业,具体魁省那个学校有这个专业我也没查过,但是这行学习时间短,语言要求低,对体力要求也不太高。工作职位都在大医院里,相对稳定待遇好。
 

gongbao

宇宙最最知名园友
最大赞力
0.00
当前赞力
100.00%
I only know how to write the program with "for loop" to display the letter "I". so I know how to use the "for loop" for very very simply programs. Here is the program for the letter ''I".

public class ASCIIArt {

public static void main(String[] args) {

Scanner userInput = new Scanner(System.in);


System.out.print("Please enter a number to indicate how many stars: \n");

final int MAX_SIZE = 8;
int size = userInput.nextInt();

for (int i = 1; i <= size; i++) {
if (size <=MAX_SIZE){
System.out.println(" *");
}
else{
System.out.println("Invalid entry.");
}
}


How do you use the "for loop" to write the program to display the letter "Z". the height of the letter "Z" changes accordingly when the user enters different numbers.

第一版Java代码在下面,"Try these challenges: add more letters to the menu, allow the user to specify the width of the letters or try to make different shapes.", 留给你自己搞定,基本的原理都是一样的,只不过把字母的宽度也设置成变量,再和矩阵的列column数进行运算。:wdb35:

obs! LetterGenerator.java二维矩阵只显示一个角标啊,我另一贴screenshot给你。

代码:
package asciiart;

import java.util.Scanner;

/**
*
* @author zw
* Version 1,0
*/
public class ASCIIArt {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
    
        Scanner scanHeight = new Scanner(System.in);
        System.out.print("Input the size of the height(better odd, larger than 2): ");
        int height = scanHeight.nextInt();
        LetterGenerator gen = new LetterGenerator(height);
        Scanner scanOption = new Scanner(System.in);
        System.out.print("Welcome to My ASCII ART: 1. I; 2. L; 3. T; 4. Z; 5. Quit: ");
    
        int input = scanOption.nextInt();
    
        switch(input) {
        
            case 1:
                gen.drawI();
                gen.print();
                break;
            
            case 2:
                gen.drawL();
                gen.print();
                break;
            case 3:
                gen.drawT();
                gen.print();
                break;
            case 4:
                gen.drawZ();
                gen.print();
                break;
            case 5:
                System.out.println("Bye!");
                break;
            default:
                System.out.println("Invalid input!");
                break;
        }
    }

}

代码:
package asciiart;

/**
*
* @author zw
*/
public class LetterGenerator {
    
    private final int r;
    private final String letter[][];
      
    public LetterGenerator(int r) {
        this.r = r;
        this.letter = new String[r][r];
        for(int i = 0; i < r; i ++) {
            for(int j = 0; j < r; j ++) {
                letter[j] = " ";
            }
        }
    }
      
    public void drawI() {
       for(int i = 0; i < r; i ++) {
           letter[r - 1] = "*";
       }
    }
  
    public void drawL() {
        for(int i = 0; i < r; i ++) {
           for(int j = 0; j < r; j ++) {
               if(i < r) {
                   letter[0] = "*";
               }
               if(j < r) {
                   letter[r - 1][j] = "*";
               }
           }
       }
    }
  
    public void drawT() {
        int mid = r / 2;
        for(int i = 0; i < r; i ++) {
            for(int j = 0; j < r; j ++) {
                if(i < r) {
                   letter[mid] = "*";
               }
               if(j < r) {
                   letter[0][j] = "*";
               }
            }
        }
    }
  
    public void drawZ() {
    
        for(int i = 0; i < r; i ++) {
           for(int j = (r - 1); j >= 0; j --) {
               if(i == 0 || i == (r - 1)) {
                   letter[j] = "*";
               } else {
                   letter[r - i - 1] = "*";
               }
           }
       }
    }
      
    public void print() {
      
            for(int i = 0; i < r; i ++) {
                for(int j = 0; j < r; j ++) {
                 System.out.print(letter[j]);
            }
                System.out.println("");
        }
    }
}
 
最后编辑: 2017-06-27
最大赞力
0.00
当前赞力
100.00%
我都47了,儿子已经上大学,我想随便干了pt或季节性的工作,便于我经常回国看老公。所以我不想继续了,把自己累的越来越老,我要保养好身体和容貌,给老公惊喜。我怕时间长了,家里会有新女主人。在加拿大我安不下心来,总是焦虑。所以有个事做,打发一下时间,然后又不耽误我经常回国,是最好的。

所以,抱歉,不陪你走下一段了。
祝你早日通过资格!
孩子大学还是回流算了
 

Similar threads

家园推荐黄页

家园币系统数据

家园币池子报价
家园币最新成交价
家园币总发行量
加元现金总量
家园币总成交量
家园币总成交价值

池子家园币总量
池子加元现金总量
池子币总量
1池子币现价
池子家园币总手续费
池子加元总手续费
入池家园币年化收益率
入池加元年化收益率

微比特币最新报价
毫以太币最新报价
微比特币总量
毫以太币总量
家园币储备总净值
家园币比特币储备
家园币以太币储备
比特币的加元报价
以太币的加元报价
USDT的加元报价

交易币种/月度交易量
家园币
加元交易对(比特币等)
USDT交易对(比特币等)
顶部