自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 斯坦福大学开放课程——编程方法 作业7

<br /> <br />    For this assignment, you will create an application that keeps tracks of the information in such a simple social network.  More specifically, your application will allow for user profiles to be added to, deleted from, or looked-up in the s

2011-01-06 10:05:00 2013

原创 斯坦福大学开放课程——编程方法 作业6

<br /> <br />      The goal of this assignment is to create a program that graphs these names over time, as shown in the sample run in Figure 1. In this diagram, the user has just typed Samantha into the box marked ―Name‖ and then clicked on the ―Graph but

2010-12-27 17:02:00 1915

原创 斯坦福大学开放课程——编程方法 作业5

       原PDF中的内容不想一点点的翻译过来,直接Goolge了一下游戏规则贴上来了。其基本内容相同游戏规则  每位玩家丢五个骰子, 总和最高的玩家为起始玩家, 其它依顺时钟方式进行每个玩家回合将五个骰子丢进骰子杯里, 摇动后翻开来, 每个回合最多有摇三次机会, 当第一次摇出后, 玩家可以选择任意数量的骰子丢回骰子杯里重摇, 第二次摇后,玩家可以再选择丢任意数量的骰子丢回骰子杯里重摇, 包括第一次保留的, 最后一次摇完后即计分  计分卡  在计分卡有 13 格计分位置, 分别详述如下  1's 每一个

2010-12-22 14:38:00 1942

原创 斯坦福大学开放课程——编程方法 作业4 完整代码

昨天弄了下午把第四次作业终于完整实现了。 不多说了,贴上完整的源代码Hangman.java/* * File: Hangman.java * ------------------ * This program will eventually play the Hangman game from * Assignment #4. *///import acm.graphics.*;import acm.program.*;import acm.util.*;//impor

2010-12-17 11:33:00 3227 1

原创 斯坦福大学开放课程——编程方法 作业4 Part I

把第四次作业的第一部分的功能实现了,先暂存在这里。Part I—Playing a console-based gameTo solve the problem, your program must be able to: Choose a random word to use as the secret word. That word is chosen from a word list, as described in the following paragraph.Keep track of the

2010-12-16 14:53:00 1023

原创 斯坦福大学开放课程——编程方法 作业3

   作业的要求和相关介绍太多了,直接贴上我写的源代码。不过,还有些问题没有完全搞明白。这个只能算一个初级版本吧。程序源代码:/* * File: Breakout.java * ------------------- * Name: * Section Leader: * * This file will eventually implement the game of Breakout. */import acm.graphics.*;import acm.prog

2010-12-15 15:00:00 1779

原创 斯坦福大学开放课程——编程方法 作业2 - 6

6.     Douglas Hofstadter’s Pulitzer-prize-winning book Gödel, Escher, Bach contains many interesting mathematical puzzles, many of which can be expressed in the form of computer programs. In Chapter XII, Hofstadter mentions a wonderful problem that is wel

2010-12-14 16:24:00 959

原创 斯坦福大学开放课程——编程方法 作业2 - 5

5.  Write a ConsoleProgram that reads in a list of integers, one per line, until a sentinel value of 0 (which you should be able to change easily to some other value). When the sentinel is read, your program should display the smallest and largest values i

2010-12-14 16:12:00 1175 2

原创 斯坦福大学开放课程——编程方法 作业2 - 4

4.   In high-school geometry, you learned the Pythagorean theorem for the relationship of the lengths of the three sides of a right triangle:  a2 + b2 = c2 which can alternatively be written as: c = sqrt(a2 + b2 ) .   Most of this expression contains simpl

2010-12-14 16:04:00 1050

原创 斯坦福大学开放课程——编程方法 作业2 - 3

3.    Write a GraphicsProgram subclass that draws a partial diagram of the acm.program class hierarchy, as follows:    The only classes you need to create this picture are GRect, GLabel, and GLine. The major part of the problem is specifying the coordinate

2010-12-14 15:51:00 1301

原创 斯坦福大学开放课程——编程方法 作业2 - 2

2.    Suppose that you’ve been hired to produce a program that draws an image of an archery target—or, if you prefer commercial applications, a logo for a national department store chain—that looks like this:    This figure is simply three GOval objects, t

2010-12-14 15:44:00 1244

原创 斯坦福大学开放课程——编程方法 作业2 - 1

1.    Write a GraphicsProgram subclass that draws a pyramid consisting of bricks arranged in horizontal rows, so that the number of bricks in each row decreases by one as you move up the pyramid, as shown in the following sample run:   The pyramid should b

2010-12-14 15:38:00 1100

原创 斯坦福大学开放课程——编程方法 作业1-4

Problem 4 As an exercise in solving algorithmic problems, program Karel to place a single beeper at the center of 1st Street. For example, if Karel starts in the world it should end with Karel standing on a beeper in the following position: Note that the f

2010-12-14 15:03:00 1129 1

原创 斯坦福大学开放课程——编程方法 作业1-3

Problem 3 In this exercise, your job is to get Karel to create a checkerboard pattern of beepers inside an empty rectangular world, as illustrated in the following before-and-after diagram: This problem has a nice decomposition structure along with some in

2010-12-13 21:26:00 2285 7

原创 斯坦福大学开放课程——编程方法 作业1-2

Problem 2 Karel has been hired to repair the damage done to the Quad in the 1989 earthquake. In particular, Karel is to repair a  set of arches where some of the stones (represented by beepers, of course) are missing from the columns supporting the arches,

2010-12-13 17:36:00 1590

原创 斯坦福大学开放课程——编程方法 作业1-1

Problem 1 Your first task is to solve a simple story-problem  in Karel’s world.  Suppose that Karel has settled into its house, which is the square area in the center of the following diagram:Karel starts off in the northwest corner of its house as shown i

2010-12-13 16:00:00 1847 4

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除