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

歡迎訪問 生活随笔!

生活随笔

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

编程问答

java模拟开锁

發布時間:2023/12/9 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 java模拟开锁 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

java模擬開鎖

service qq:928900200

Introduction to Computer Science II: CSCI142
Fall 2014
Lab #1
Instructor: Daniel Plante
Assigned: Monday, September 8, 2014
Turn In By: Monday, September 15, 2014 (Zipped project with all
files by MIDNIGHT)
For this lab, you will be designing and programming a number of classes representing different possible locks. You
will only be responsible for three specific lock types, but very important is the issue of how the functionality of the
locks should be abstracted into possible classes, abstract classes, and interfaces. We will design the classes by hand in
class, we will begin to use ArgoUML to create the class diagram. With this as a starting point, I will complete the
design and provide it with the rest of this assignment on Blackboard. This will be a “group” project, and as there are 14
of you in the class, you will pair up in teams of two to complete the lab. As there will be no class on Wednesday, you
will have class time to work together on this. Below is a description of the lab.
The three lock types are shown and described below:
KeyLock ComboLock KeylessEntryLock
The first lock, KeyLock, is simple, but the other two have some details that must be provided. The details are as
follows:
ComboLock
? Initially set combination of
length 3 (only set via the
constructor) with numbers
between 0 and MAX_VALUE,
either set randomly or by
providing the numbers
? 3 numbers set such that the first
and last numbers result in a
remainder x when divided by 4,
with middle number having
remainder (x+2)%4 when
divided by 4
KeylessEntryLock
? Initially set a 6-digit passcode (6DPC) in constructor
? Create new 4-digit user code (4DUC):
6DPC → * → 1 → New 4DUC → Repeat 4DUC
? Delete 4DUC:
6DPC → * → 2 → Existing 4DUC → Repeat 4DUC
? Delete ALL user codes:
6DPC → * → 6 → Reenter 6DPC
? Change 6DPC:
6DPC → * → 3 → New 6DPC → Repeat New 6DUC
? Also allows for entry with key
The design you must use and conform to will be the one we collectively decide on in class. You MUST stick to it! You
may add other properties as well as private, protected, and public methods, but the ones we agree on must also be there
and work as we agree on in class.

轉載于:https://www.cnblogs.com/guoyiqi/p/3975020.html

總結

以上是生活随笔為你收集整理的java模拟开锁的全部內容,希望文章能夠幫你解決所遇到的問題。

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