查看: 17915| 回复: 35
跳转到指定楼层
上一主题 下一主题
收起左侧

[讨论]UC Berkeley EECS 61B: Data Structures & Algorithms in Java

🔗
NicklX | 只看该作者 |倒序浏览
全局:
公开课
学校名称: UC Berkeley
Unit号: 4
开课时间: 2006
课程全名: Data Structures & Algorithms in Java
平台: 其他

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

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

x

似乎版内有不少人上这个课(虽然超老,不像coursera/udacity)
希望这个帖子能存下讨论的内容。。
=================================
我听了第一个lecture后发现这课前半段还是在讲纯Java = =…我在学校已经有学过 难不成Berkeley EECS 61A的设置是不一样的?…

不知道大家是不是都跳过前几节lecture的?
=========================
课程链接:


http://www.youtube.com/results?search_query=cs+61b&oq=cs+61b&aq=f&aqi=g-s1g9&aql=&gs_l=youtube.3..0i10j0l9.3049.4351.0.4647.6.6.0.0.0.0.51.290.6.6.0...0.0.


http://www.youtube.com/watch?v=QMV45tHCYNI&list=SP4BBB74C7D2A1049C&index=1

http://www.cs.berkeley.edu/~jrs/61b/

评分

参与人数 2大米 +20 收起 理由
zihaolucky + 10 感谢分享!
EroicaCMCS + 10 开贴有奖

查看全部评分


上一篇:【重磅!】寒假将至,Stanford Online一大波公开课袭来!
下一篇:An Introduction to Interactive Programming in Python #week 9 #
lixiang.xjtu 2014-1-2 09:25:27 | 只看该作者
全局:
lixiang.xjtu 发表于 2013-12-28 11:56
视频有2013spring的,也再youtube上

http://www.youtube.com/watch?v=f ... hOxMNP7bpP4hhhKNY9s
回复

使用道具 举报

全局:
求讨论,我不确定我答案是对的

http://www.cs.berkeley.edu/~jrs/61b/lab/lab5/readme

  ((Superclass) subclassvariable).method();
我以为可以调用Super class的方法,但是居然不是的。。。为啥?
some code here, 求能人给看看啊啊啊
这个例子里面,没有什么办法能把Array of a superClass cast 成为 Array of subClass,我漏掉了什么吗?


  1. // Part I:  Assignments and Casting (1 point)
  2. // ------------------------------------------
  3. // Let Y be a subclass of X, and let y and x be variables of classes Y and X
  4. // respectively.  From lecture, you know that the assignment "x = y" is valid, but
  5. // the assignment "y = (Y) x" requires a cast to compile, and will cause a
  6. // run-time error if x references an object that isn't a Y.

  7. // What about arrays of objects?  Suppose xa is an array of X's, and ya is an
  8. // array of Y's.




  9. class X{  //Animal
  10.         protected int a = 1;
  11.         public int aa(){return (1);}
  12. }

  13. class Y extends X{ //Dog
  14.         protected int a = 2;
  15.         public int aa(){return(2);}
  16. }

  17. class Z extends X{ //Cat
  18.         protected int a = 3;
  19.         public int aa(){return(3);}
  20. }

  21. class testClass{
  22.         public static void main(String[] args){
  23.                 X x = new X();
  24.                 Y y = new Y();

  25.                 x = y;
  26.                 y = (Y) x;

  27.                 X[] xa = new X[5];
  28.                 Y[] ya = new Y[3];

  29. // (a)  At compile-time, can we assign xa to ya, and vice versa?  When is a cast
  30. //      required?
  31. // can assign Dog to Animal, but not vice versa, without casting
  32.                 xa = ya;

  33.                 X[] xa2 = new X[2];
  34.                 Y[] ya2 = new Y[3];

  35. // (b)  At run-time, if ya references an array of Y's, can we assign it to xa?
  36. //      Can we then assign it back from xa to ya?
  37.                 // Yes can assign Array of Dogs to Animals,  then assign back is also ok
  38.                 // ya2 = (Y[]) xa2; // can compile, run time error, can't assign animals as dogs.
  39.                 xa2[0] = new Y();
  40.                 xa2[1] = new Y();
  41.                 // ya2 = (Y[]) xa2; // still doesn't work, same run time error
  42.                 xa2 = ya2;

  43.                 X[] za = new X[2]; // array of animals
  44.                 // za[0] = new Z(); // this can be non assigned
  45.                 za[1] = new Z();
  46. // (c)  If xa references an array of X's (that are not Y's), can we assign it to
  47. //      ya?  Can we then assign it back from ya to xa?  Does it make a difference
  48. //      if the array of type X[] references objects that are all of class Y?  Why
  49. //      do you think this is the case?


  50.                 // ya = (y[]) za; // run time error!! can not cast cats to dogs

  51.                 za = new X[2];
  52.                 za[0]=new Y();
  53.                 za[1]=new Y();

  54.                 // ya = (Y[]) za;// run time error!! can not cast cats to dogs
  55.         }
  56. }
复制代码
回复

使用道具 举报

推荐
nibuxing 2014-1-11 05:25:07 | 只看该作者
全局:
跟完18个lectures,作业也都完成了。前18课都是java的基础部分,虽然教了链表,但感觉链表用的不是很多吧。从19课开始真正讲数据结构和算法,希望能赶在P大的课出来前学掉大部分!
PS 连着跟三门加学校的课真是太累了,不知道自己的极限能到哪儿,加油!

点评

+U!  发表于 2014-1-12 14:13
回复

使用道具 举报

全局:
看了一下两个版本的,更喜欢老版本的,板书听的认真一点,本来担心知识更新老版本太老了,对于数据结构好像没啥,我是从19开始听的
回复

使用道具 举报

🔗
nibuxing 2013-12-27 07:44:10 | 只看该作者
全局:
虽然前面还是讲了不少java基础的东西,但老师讲的相当清晰,非常有助于理清概念上的模糊,我觉得还是不要跳掉比较好~
回复

使用道具 举报

🔗
pureds 2013-12-27 12:30:37 | 只看该作者
全局:
好东西,多谢分享
回复

使用道具 举报

🔗
lixiang.xjtu 2013-12-28 11:56:47 | 只看该作者
全局:
视频有2013spring的,也再youtube上

点评

能帮忙搬运一下不?  发表于 2014-1-2 03:08
回复

使用道具 举报

🔗
Howie 2013-12-28 21:02:21 | 只看该作者
全局:
前面几节课的内容就是熟悉java的。你如果很熟悉也可以跳过。但是这个老师讲的非常清楚。。我觉得比其他的书本课程要清楚。而且也没有几节。话说我也是看的06fall的。。。因为这个可以看到老师 。。。。。
回复

使用道具 举报

🔗
nibuxing 2013-12-29 09:40:30 | 只看该作者
全局:
做好hw2,问一下大家是在什么上做的,eclipse上吗?
还有Joyce学姐当年的各个作业哪儿有下
回复

使用道具 举报

🔗
modifiedname 2014-1-7 16:43:30 | 只看该作者
全局:
hmm i actually prefer the 2006 videos. the 2013 ones have significant delay in writing, and the terrible handwriting really throws me off....

点评

赞同,原始的黑板还是好看些!  发表于 2014-1-12 14:09
回复

使用道具 举报

🔗
modifiedname 2014-1-11 05:30:13 | 只看该作者
全局:
from Eroica: 61B和Princeton Algo I & II不是重复了么,而且感觉61B更难。

如果是要delve into programming的话:
1 UW的Programming Language推荐!过了时间,但还有archive
2 Stanford CS107
回复

使用道具 举报

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

本版积分规则

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