日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

北航 2012 秋季 现代软件工程 两人结对 作业要求

發布時間:2024/7/23 编程问答 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 北航 2012 秋季 现代软件工程 两人结对 作业要求 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

?

Pair Project: Elevator Scheduler [電梯調度算法的實現和測試]?

Design and implement an Elevator Scheduler to aim for both correctness and performance, in managed code.

?

Skills to learn and practice:

a)?????? Peer to peer collaboration

b)?????? Requirement Analysis

c)?????? Design by contract,? Interface design and comprehension

d)?????? Test Driven Development, Unit Test

e)?????? Algorithm design

f)??????? Implementation

?

?

?

?

1.???????????????? Background

Imagine we’re building a tall office building,? it has the following configuration about elevators:

Building has 21 floors, 4 elevators, many passengers use these elevators everyday (passenger weight: average 70kg. max 120kg, min 45kg).

?

Other constant data: Elevator speed, door open/close time, passenger time for going in/out of the elevator. ?We can make reasonable assumptions about these.

?

The building has 21 floors, from floor 0, 1, ... to 20.? Floor 0 is the underground parking level, floor 1 is the lobby level. Most people come in/out the building via these 2 floors.

?

Elevator name

Service floor list

Passenger limit

Weight limit

1

All floors

10

800 kg

2

All floors

10

800 kg

3

All floors

20

1600 kg

4

All floors

20

2000 kg

?

2.???????????????? Requirement to Student pairs

A framework with a naive algorithm is prepared and shared to students. ?The core task for students? is to design and implement the scheduling algorithm. ?Students? need to write their own scheduler class (implements the IScheduler interface)Update the SchedulerFactory.CreateScheduler method so the test framework can instantiate your class.

?

????? TA will come up with a consistent testing model to test your program according to the “rush hour” scenario (see below), and record the total travel time of each passengers. ?

?

Total Travel Time = the time delta between the passenger appears in front of the elevator, and the time she gets off the elevator at this designated floor.

?

You (student pair) have:

1)????? A set of API

2)????? A naive solution (BUS program)

3)????? A set of test cases to run

?

2.3? Explanation of BUS program:

?We can have a naive algorithm called “BUS”.?? BUS algorithm treats an elevator as a bus,? it goes from bottom to top,? stops at every floor, opens its door, to let people in and out (if any),? then closes the door and moves on.? After it reaches the top floor, it will go down and stop at each floor again.? This algorithm can serve all requests, but it’s apparently not the fastest algorithm.

?

Your code is required to be managed code (C#, managed C++, etc).

It has to generate 0 (zero) VS Code Analysis warnings and errors.

It has to be correct

It has to be fast

?

Score guideline:? TA will evaluate the “average total travel time” for all passengers in the same test case,? the lower, the better.? If your performance is slower than “bus” solution, you get 0 points;? if your program can’t deliver any passenger to the correct destination, you get 0 points.

?

One hint about elevator scheduling:?? When total weight is within 45 kg of the max limit, or the number of passengers is already at maximum, the elevator doesn’t need to stop for more external requests.

?

The elevator scheduler program doesn’t know how many passengers are waiting on each floor,? it doesn’t know how many passengers will show up either.? This is the same with the real world situation.

?

3.???????????????? Testing

TA will simulate a “rush hour” (上下班高峰時刻) test.?? The “rush hour” test is to simulate the come-to-work and leave-work scenario in a business building, which has the following 2 parts (they can be run next to each other).

1)????? Simple test.? 20 passengers

20 people going thru random floors within 5 minutes.??

2)????? Come-to-work.? 1000 total passengers

a)??????? 80% of them goes from floor 0 and 1 to all other floors, the destination is distributed evenly.? The time each passenger arrives at the elevator can be emulated as a normal distribution.

b)??????? 20% of them are going between any 2 floors of [2, 20],? Very few people travel between 2 adjacent floors (e.g. from floor 5 to 4).? Other than this, the distribution is also even.

3)????? Leave-work.? 1000 total passengers

a)??????? 90% of them go from other floors to floor1 or floor0.

b)??????? 10% of them travel between floors [2, 20], again, Very few people travel between 2 adjacent floors.

?

?

4.???????????????? 作業步驟

?

作業

博客要求 (1個博客, 附加題的解法寫另一個博客)

博客注明結對編程人員的名字/或學號后3.

看教科書和其它參考書, 網站中關于結對編程的章節。例如:

http://www.cnblogs.com/xinz/archive/2011/08/07/2130332.html

照至少一張照片, 展現兩人在一起合作編程的情況。

說明結對編程的優點和缺點。

結對的每一個人的優點和缺點在哪里 (要列出至少三個優點和一個缺點)

看教科書和其它資料中關于 Information Hiding, interface design, loose coupling 的章節

?

說明怎樣利用這些好的設計方法。

Design by Contract, Code Contract 的內容:

http://en.wikipedia.org/wiki/Design_by_contract

http://msdn.microsoft.com/en-us/devlabs/dd491992.aspx

描述這些做法的優缺點, 說明你是如何把它們融入你的作業中的。

看教科書中,網上有關 unit test 的內容

http://www.cnblogs.com/xinz/archive/2011/11/20/2255830.html

?

通過截屏顯示你是如何用VS unit test 來保證你寫的類的質量的。顯示unit test 對你的寫的類 (class) 的覆蓋率

閱讀有關 UML 的內容

畫出UML 圖顯示各個實體之間的關系 (畫一個圖即可)

實現你的算法

說明你的算法的關鍵 (不必列出源代碼), 以及獨到之處。

?

把你的代碼簽入TFS (問老師要權限及小組的路徑)

?

[附加題]改進電梯調度的interface? 設計, 讓它更好地反映現實, 更能讓學生練習算法, 更好地實現信息隱藏和信息共享。

目前的設計有什么缺點, 你會如何改進它?? Analyze the API design, and propose a better API so that Scheduler can have more freedom and students can do more realistic scheduling.?

[附加題] 目前的這個測試程序只有命令行界面, 請給它設計UI 界面, 顯示乘客/電梯的運動, 并實現之。

Implement a UI to show how people/elevator moves? (write? a? blog to show your code and UI)

?

[附加題]? 閱讀有關 MVC ? MVVM 設計模式的文章。

說明你寫的電梯調度的UI /Algorithm/interface 如何實現了MVC MVVM 的算法。

[附加題] 我們現在的題目是假設所有電梯到達所有的樓層。? 在現實生活中,? 多部電梯到達的樓層都不一樣。如果是這樣 (例如3號電梯能到達10 – 20 層,? 4 號電梯能到達5-15 層),整個程序框架和你的電梯調度模塊要做什么改變??

請說明你的改進意見

?

作業期限: 由老師決定。

?

第二次結對編程作業 (同學們重新組合成為新的兩人對)

?

?

1) 以實際項目為例, 完成這一個軟件測試,用戶調查,項目分析和規劃的作業:

  http://www.cnblogs.com/xinz/archive/2012/03/26/2417699.html?

???? 截止日期: 12/28/2012 晚11:00pm.? (如果你到這時候還沒做, 那熬夜做和第二天做是一樣的,都是0 分。 不交作業倒扣分。)

?

2)? 有了電梯的調度算法和電梯的測試模擬框架, 我們可以從數據層面模擬并測試算法的正確性和效率。 那么現在我們要加上展現的部分 – 用GUI ?展現電梯系統從運送所有乘客的過程。 想象一幢大樓全都是透明的,? 有許多乘客通過電梯上上下下,? 電梯外墻的指示燈 (通常有上/下)? 兩個標識隨著乘客的需求或亮或滅。?

實現: ?根據第一次結對項目的電梯測試系統, 和你自己的調度模塊 (兩個同學各帶一個調度模塊),任選一種編程語言實現 GUI.?

?

能跑起來就是成功!?? 詳細評分標準:

1)??? 能完整而準確地反映調度算法運行的過程,并動態顯示系統的基本數據? (當前活躍的乘客數量,? 乘客的平均旅行時間, 等)

2)??? 能轉換電梯調度模塊,通過簡單的命令參數就可以調用不同模塊進行演示。

3)??? 在程序啟動時,能自動調節UI 以適應不同的樓層和電梯數目的限制。

4)??? UI 方面, 樓層, 電梯, 乘客, 指示燈的設計要讓觀眾看得清楚,? 比例協調, ?同時有一定的美感。如能支持乘客進出電梯,電梯運行的動畫,則可加分。

5)??? 支持啟動, 暫停,繼續,結束等控制。

6)??? 按照 GUI 實現語言的種類分別給程序排序, 鼓勵用比較新的語言/框架來實現。

7)??? 獎勵分數: 如果能支持局部放大, 鼠標點擊電梯/乘客能顯示具體數據;? 如果能設計API? 讓不同的展示模塊能使用同一個API, 不用重新編譯, 就可以加載不同展示模塊 (特別是用不同的語言實現的展示模塊)

?

演示要求:

1)??? 啟動電梯測試框架程序和測試數據 (建議數據規模:?? 6 層樓,? 2 部電梯, 10 乘客 ) , 載入調度算法1, ????

2)??? 同樣啟動電梯測試框架程序和同樣的測試數據, 載入調度算法 2 (此算法必須和前一個不同),

3)??? 同時開始運行兩個模擬情景, 查看 GUI 模塊的顯示是否滿足各項評分標準。

4)??? 再載入不同的測試數據重復 ( 建議數據規模:?? 10 層樓,? 4 部電梯, 500 人)

?

提交程序/文檔:

1)?? 程序要簽入TFS? 截至日期: 1/9/2013

2)?? 把設計/源程序架構/代碼行數/運行時的截屏/設計心得/等等 寫成博客。? 1/9/2013

?

?

總結

以上是生活随笔為你收集整理的北航 2012 秋季 现代软件工程 两人结对 作业要求的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 国产123区在线观看 91国产一区二区 | 欧美videos另类精品 | 六月丁香激情网 | 亚洲av毛片成人精品 | 桃花岛影院 | 中字幕视频在线永久在线观看免费 | 国产精品国产三级国产Av车上的 | 中文在线字幕免费观 | 中文字幕专区 | 亚洲wwwwww| 欧美另类xxxx野战 | 亚洲天堂一区二区三区四区 | 特黄特色大片免费 | 看毛片视频| 欧美精品18videosex性欧美 | 久草视频精品在线 | 国产精品免费在线播放 | 农村老女人av | 麻豆视频观看 | 国产精品久久久久久久久毛片 | 丝袜 亚洲 另类 国产 制服 | 豆花免费跳转入口官网 | 一道本视频在线 | 午夜精品视频在线观看 | 亚洲国产精品99久久久久久久久 | 最近中文字幕在线中文高清版 | 台湾swag在线观看 | 日日操夜夜撸 | 中文字幕性| 性欧美18一19性猛交 | 波多野结衣电车痴汉 | 黄色激情在线观看 | 91精品欧美 | 四虎永久在线精品免费一区二区 | www.国产在线视频 | 国产又粗又猛又爽又黄的视频在线观看动漫 | 手机看片国产 | 精品一区二区三区无码视频 | 中国新婚夫妻性猛交 | 麻豆国产一区二区三区四区 | 国产精品夜色一区二区三区 | 亚洲一区二区三区婷婷 | 偷拍久久久 | 日韩六十路 | av首页在线观看 | 日本久久99 | 乳罩脱了喂男人吃奶视频 | 国产拍拍视频 | 日本热久久 | 亚洲国产果冻传媒av在线观看 | 免费a级黄色片 | 天天透天天操 | 五月天六月色 | www亚洲| 91精品人妻一区二区三区蜜桃欧美 | 免费一级欧美 | 北岛玲av | 一级二级av| 日本黄色一区二区 | 欧美日韩一区在线播放 | 国产成人三级在线观看视频 | 99自拍 | 50度灰在线| 一级视频毛片 | 色图网址 | 亚洲αv | 日韩欧美一级 | 亚洲最新av网址 | 天天天天天天操 | 天堂网在线中文 | 国产精品久久综合青草亚洲AV | 黄色小视频免费在线观看 | 毛利兰被扒开腿做同人漫画 | 日韩一区二区影视 | 国产性―交―乱―色―情人 | 中文字幕精品在线观看 | 免费视频一二三区 | 爱情岛论坛亚洲品质自拍视频 | 午夜黄色福利 | 永久免费不卡在线观看黄网站 | 久久久www免费人成人片 | 国产成人在线视频观看 | 欧美电影一区二区三区 | 国产伦精品一区二区三区 | 日韩不卡在线视频 | 蜜桃视频免费网站 | 久久人人超碰 | 欧美日韩日本国产 | 日韩激情久久 | 欧美亚洲图片小说 | 欧美福利视频 | 森泽佳奈中文字幕 | 一级黄色性片 | 另类小说欧美 | 欧美高清hd | 黑人3p波多野结衣在线观看 | 精品一区二区三区久久久 | 天天干视频 | 性做久久久久 |