📣 独立日限时特惠: VIP通行证立减$68
查看: 53295| 回复: 228
跳转到指定楼层
上一主题 下一主题
收起左侧

Berkeley CS 61B Data Structures(in Java) Lab1 讨论帖

 
全局:
公开课
学校名称: Berkeley
Unit号: 1
开课时间: 2014-05-12
课程全名: CS 61B Data Structures
平台: 其他

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
本帖最后由 jaly50 于 2014-5-26 23:18 编辑

作业入口:http://www.cs.berkeley.edu/~jrs/61b/lab/lab1/

看完第二课视频Using objects就可以做这次的作业。
   第一次作业实在是没什么好说的,咱们没有TA给我们Check off,也没有Emacs可以用。我看了一下,咱们能做的只有把那个有错误的names.java改对。


  作业要求:
       1.load the program file Names.java
       2. build a command line to run the Java compiler:        javac -g  Names.java
       3. You will find that javac cannot compile the program.  The code contains two syntax errors which you are quite likely to make when you will write programs.
      (The second error won't rear its head until you fix the first one.)       
       4.Figure out what's wrong, correct the errors, save the file, and compile the code.      
       5. 可以编绎了以后,还有些Run-time Error, 把那些改对,运行成功了,就可以交差了。  

This homework assignment is meant to make sure you can write, compile, and runsimple Java programs.  This is an individual assignment; you may not sharecode with other students. You will need to know how to compile and run Javaprograms, as described in Lab 1.

Lab贴不加分~~~只讨论!!!

课程不鼓励大家分享代码,作业成功运行,输出图如下:





相关链接:      

       【公开课讨论+加分总贴】:UC Berkeley CS 61B Data Structures(in Java)
       【课程网站】:http://www.cs.berkeley.edu/~jrs/61b/
       【视频网站】:【Youtube】【Youku

        【教材】:Head First Java 【中文版】【英文版
                      Data Structures and Algorithms in Java, 5th Edition. 【英文版

号外:程序中给出的测试数据有限,欢迎大家踊跃上传自己的测试数据!!!


评分

参与人数 2大米 +3 学分 +1 收起 理由
小小溪 + 3 感谢分享!
sanguine + 1

查看全部评分


上一篇:Berkeley CS 61B Data Structures(in Java) Homework1 加分+讨论帖
下一篇:Berkeley CS 61B Data Structures(in Java) Lab2 讨论帖
全局:
done by eclipse

LAB1.png (11.05 KB, 下载次数: 7)

LAB1.png
回复

使用道具 举报

推荐
Jason_Lee 2018-3-11 13:12:07 | 只看该作者
全局:
本帖最后由 Jason_Lee 于 2018-3-11 13:56 编辑

该lab1用于熟悉运行java程序的流程;
借鉴回复用了eclipse作为ide;
其中涉及在eclipse中的文件操作,如:
create new java project; put java program in workspace; ...
之后能够对程序进行edit, compile, run操作;
代码本身:
主要涉及string methods;
compile error; run-time error的修改;
结果如下:


回复

使用道具 举报

推荐
kaiwhu 2018-1-5 21:18:06 | 只看该作者
全局:
1. Environment: Emacs & shell with Emacs


2. Sort the file roster.txt with sort-lines function within Emacs

评分

参与人数 1大米 +3 收起 理由
mahangno1 + 3 给你点个赞!

查看全部评分

回复

使用道具 举报

🔗
melissami 2014-5-13 00:03:11 | 只看该作者
全局:
**最后还是借助了IDE,Emacs实在玩不转╮(╯▽╰)╭

这样附截图不知道可以不~

评分

参与人数 1学分 +1 收起 理由
jaly50 + 1 坚持的不错,再接再厉!

查看全部评分

回复

使用道具 举报

🔗
sqzhang17 2014-5-13 00:29:15 | 只看该作者
全局:
不知道发上了没有~这是自己用mac 的terminal compile的~不知道可行吗?

7DE9B44C-B616-4204-97E8-D80F66CC0E59.png (21.01 KB, 下载次数: 10)

7DE9B44C-B616-4204-97E8-D80F66CC0E59.png

评分

参与人数 1学分 +1 收起 理由
jaly50 + 1 坚持的不错,再接再厉!

查看全部评分

回复

使用道具 举报

🔗
 楼主| jaly50 2014-5-13 23:52:29 | 只看该作者
全局:
melissami 发表于 2014-5-13 00:03
**最后还是借助了IDE,Emacs实在玩不转╮(╯▽╰)╭

这样附截图不知道可以不~

哪里有Emacs玩呀?
回复

使用道具 举报

🔗
melissami 2014-5-14 03:02:32 | 只看该作者
全局:
jaly50 发表于 2014-5-13 23:52
哪里有Emacs玩呀?

就是在Lab1里面的,readme里面
4. Load the program file Names.java into Emacs using C-x C-f.  "C-x" is read
"control x," and is typed by holding down the control (Ctrl) key while typing
"x".  You may need to type the full pathname lab1/Names.java, then hit Enter.

Names.java is a simple program for performing various string operations on a
name.  It almost works, but you need to make some changes so that it compiles
and runs correctly.

5. Compile the program within Emacs using:
        C-x C-e


他们是用Emac编译的
回复

使用道具 举报

🔗
fly-higher 2014-5-14 07:35:59 | 只看该作者
全局:


版主辛苦啦

评分

参与人数 1学分 +1 收起 理由
jaly50 + 1 以后咱们lab就不加分了,只要上传Homework.

查看全部评分

回复

使用道具 举报

🔗
 楼主| jaly50 2014-5-14 08:53:30 | 只看该作者
全局:
melissami 发表于 2014-5-14 03:02
就是在Lab1里面的,readme里面

“eMac是早期苹果出品的面向学生的一体机,当初定位就很低端,而且早就停产了,配置方面在当时就不高,更不用说现在了。”

  所以这是个苹果产品。。或者苹果机里的一个软件么?
回复

使用道具 举报

🔗
everything 2014-5-14 10:04:44 | 只看该作者
全局:
在ubuntu下装了个emacs,但是还是搞不定,最后还是用terminal run的

Screen Shot 2014-05-13 at 10.01.43 PM.jpg (32.67 KB, 下载次数: 2)

Screen Shot 2014-05-13 at 10.01.43 PM.jpg
回复

使用道具 举报

🔗
everything 2014-5-14 10:06:48 | 只看该作者
全局:
jaly50 发表于 2014-5-14 08:53
“eMac是早期苹果出品的面向学生的一体机,当初定位就很低端,而且早就停产了,配置方面在当时就不高,更不 ...

没有,emacs是个功能强大的文本编辑器,以下摘自wikipedia的介绍
Emacs /ˈiːmæks/ and its derivatives are a family of text editors that are characterized by their extensibility. The manual for the most widely-used variant, GNU Emacs, describes it as "the extensible, customizable, self-documenting, real-time display editor".[1] Development of the first Emacs began in the mid-1970s and continues actively as of 2014. Emacs has over 2,000 built-in commands and allows the user to combine these commands into macros to automate work. The use of Emacs Lisp, a variant of the Lisp programming language, provides a deep extension capability.
回复

使用道具 举报

🔗
gloria_wwj 2014-5-14 10:17:43 | 只看该作者
本楼:
全局:
如何贴图?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表