需要家庭作业的帮助 [英] Need help in homework

查看:62
本文介绍了需要家庭作业的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

本实验练习假定您具有Java编程语言的背景知识。有关资源,您可以访问https://www.oracle.com/java/index.html

说明:使用Runnable接口创建多线程程序,然后创建,初始化并启动四个Thread对象来自你的班级。线程将并发执行并显示以下String数组元素。

String course [] = {MIT411,Advanced,Operating,Systems};

第一个线程显示字符串数组的第一个元素。 (MIT 411)

第二个线程显示字符串数组的第二个元素。 (高级)

第三个线程显示字符串数组的第三个元素。 (操作)

第四个线程显示字符串数组的第四个元素。 (系统)

执行时,程序将在退出前运行至少3次线程。

提交内容:



1.从IDE(BlueJ,Netbeans等)捕获的程序代码屏幕并粘贴在此文件中。

2.输出屏幕截图 - 至少3次运行程序。 (注意:输出可能会有所不同)



我尝试过:



我试着做了说明并创建了一个程序,但我真的只是不知道JAVA中的代码如何。



请帮忙。



-Thanks

解决方案

Quote:

我真的只是不知道JAVA中的代码如何。



那么你将不得不学习,否则你的课程就会失败。



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



返回课程笔记,阅读课程这本书,你最好快点开始 - 很快就会到期!

亲自尝试一下,你可能会发现它并不像你想象的那么难。



如果您遇到特定问题,请询问相关问题,我们会尽力提供帮助。但是我们不打算为你做这一切!


转到 Java™教程 [ ^ ]

This laboratory exercise assumes that you have background in Java Programming Language. For resources on that you may visit https://www.oracle.com/java/index.html
Directions: Create a multithreaded program by using Runnable interface and then create, initialize and start four Thread objects from your class. The threads will execute concurrently and display the following String array elements.
String course [ ] = {"MIT411", "Advanced", "Operating", "Systems"};
The first thread displays the first element of the string array. (MIT 411)
The second thread displays the second element of the string array. (Advanced)
The third thread displays the third element of the string array. (Operating)
The fourth thread displays the fourth element of the string array. (Systems)
When executed, the program will run the threads at least 3 times before exiting.
What to submit:

1. Program codes screen captured from your IDE (BlueJ, Netbeans, etc) and pasted in this file.
2. Output Screen Captures – at least 3 runs of your program. (Note: Output could vary)

What I have tried:

I tried to do the instructions and create a program but I really just do not know how t code in JAVA.

Please help.

-Thanks

解决方案

Quote:

I really just do not know how t code in JAVA.


Then you are going to have to learn, or you will fail your course.

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.

Go back to your course notes, read your course book, and you had better get started quickly - it's probably due in pretty soon!
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!


Go to The Java™ Tutorials[^].


这篇关于需要家庭作业的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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