免費(fèi)下載軟件設(shè)計師歷年真題:http://m.xiexiliangjiufa.com/zhenti/rs.html
該套題在線考試:http://m.xiexiliangjiufa.com/exam/examam.aspx?t1=2&sid=811421
1、閱讀下列說明,回答問題1至問題4,將解答填入答題紙的對應(yīng)欄內(nèi)。
【說明】
某證券交易所為了方便提供證券交易服務(wù),欲開發(fā)一證券交易平臺,該平臺的主要功能如下: (1)開戶。根據(jù)客戶服務(wù)助理提交的開戶信息,進(jìn)行開戶,并將客戶信息存入客戶記錄中,賬戶信息(余額等)存入賬戶記錄中;
(2)存款??蛻艨梢韵蚱滟~戶中存款,根據(jù)存款金額修改賬戶余額;
(3)取款。客戶可以從其賬戶中取款,根據(jù)取款金額修改賬戶余額;
(4)證券交易??蛻艉徒?jīng)紀(jì)人均可以進(jìn)行證券交易(客戶通過在線方式,經(jīng)紀(jì)人通過電話),將交易信息存入交易記錄中;
(5)檢查交易。平臺從交易記錄中讀取交易信息,將交易明細(xì)返回給客戶。 現(xiàn)采用結(jié)構(gòu)化方法對該證券交易平臺進(jìn)行分析與設(shè)計,獲得如圖1-1所示的上下文數(shù)據(jù)流圖和圖1-2所示的0層數(shù)據(jù)流圖。

【問題1】(3分)
使用說明中的詞語,給出圖1-1中的實(shí)體E1-E3的名稱。
【問題2】(3分)
使用說明中的詞語,給出圖1-2中的數(shù)據(jù)存儲D1-D3的名稱。
【問題3】(4分)
根據(jù)說明和圖中的術(shù)語,補(bǔ)充圖1-2中缺失的數(shù)據(jù)流及其起點(diǎn)和終點(diǎn)。
【問題4】(5分)
實(shí)際的證券交易通常是在證券交易中心完成的,因此,該平臺的“證券交易”功能需將交易信息傳遞給證券交易中心。針對這個功能需求,需要對圖1-1和圖1-2進(jìn)行哪些修改,請用200字以內(nèi)的文字加以說明。
信管網(wǎng)參考答案:
查看解析:
m.xiexiliangjiufa.com/st/3816924632.html
2、閱讀下列說明,回答問題1至問題3,將解答填入答題紙的對應(yīng)欄內(nèi)。
【說明】
某賓館為了有效地管理客房資源,滿足不同客戶需求,擬構(gòu)建一套賓館信息管理系統(tǒng),以方便賓館管理及客房預(yù)訂等業(yè)務(wù)活動。
【需求分析結(jié)果】
該系統(tǒng)的部分功能及初步需求分析的結(jié)果如下:
(1)賓館有多個部門,部門信息包括部門號、部門名稱、電話、經(jīng)理。每個部門可以有多名員工,每名員工只屬于一個部門;每個部門只有一名經(jīng)理,負(fù)責(zé)管理本部門。
(2)員工信息包括員工號、姓名、崗位、電話、工資,其中,員工號唯一標(biāo)識員工關(guān)系中
的一個元組,崗位有經(jīng)理、業(yè)務(wù)員。
(3)客房信息包括客房號(如1301、1302等)、客房類型、收費(fèi)標(biāo)準(zhǔn)、入住狀態(tài)(已入?。慈胱。?,其中客房號唯一標(biāo)識客房關(guān)系中的一個元組,不同客房類型具有不同的收費(fèi)標(biāo)準(zhǔn)。
(4)客戶信息包括客戶號、單位名稱、聯(lián)系人、聯(lián)系電話、聯(lián)系地址,其中客戶號唯一標(biāo)識客戶關(guān)系中的一個元組。
(5)客戶預(yù)訂客房時,需要填寫預(yù)訂申請。預(yù)訂申請信息包括申請?zhí)?、客戶號、入住時間、入住天數(shù)、客房類型、客房數(shù)量,其中,一個申請?zhí)栁ㄒ粯?biāo)識預(yù)訂申請中的一個元組;一位客戶可以有多個預(yù)訂申請,但一個預(yù)訂申請對應(yīng)唯一的一位客戶。
(6)當(dāng)客戶入住時,業(yè)務(wù)員根據(jù)客戶的預(yù)訂申請負(fù)責(zé)安排入住客房事宜。安排信息包括客房號、姓名、性別、身份證號、入住時間、天數(shù)、電話,其中客房號、身份證號和入住時間唯一標(biāo)識一次安排。一名業(yè)務(wù)員可以安排多個預(yù)訂申請,一個預(yù)訂申請只由一名業(yè)務(wù)員安排,而且可安排多間同類型的客房。
【概念模型設(shè)計】
根據(jù)需求階段收集的信息,設(shè)計的實(shí)體聯(lián)系圖如圖2-1所示。
【關(guān)系模式設(shè)計】
部門(部門號,部門名稱,經(jīng)理,電話)
員工(員工號, ( a ),姓名,崗位,電話,工資)
客戶( ( b ) ,聯(lián)系人,聯(lián)系電話,聯(lián)系地址)
客房(客房號,客房類型,收費(fèi)標(biāo)準(zhǔn),入住狀態(tài))
預(yù)訂申請( ( c) ,入住時間,天數(shù),客房類型,客房數(shù)量)
安排(申請?zhí)?,客房號,姓名,性別, (c) ,天數(shù),電話,業(yè)務(wù)員)
【問題1】(4分)
根據(jù)問題描述,補(bǔ)充四個聯(lián)系,完善圖2-1,的實(shí)體聯(lián)系圖。聯(lián)系名可用聯(lián)系1、聯(lián)系2、聯(lián)系3和聯(lián)系4代替,聯(lián)系的類型為1:1、1:n和m:n (或1:1,和1:*和*:*)。
【問題2】(8分)
根據(jù)題意,將關(guān)系模式中的空(a)~(d)補(bǔ)充完整,并填入答題紙對應(yīng)的位置上。 (2)給出“預(yù)訂申請”和“安排”關(guān)系模式的主鍵和外鍵。
【問題3】(3分)
【關(guān)系模式設(shè)計】中的“客房”關(guān)系模式是否存在規(guī)范性問題,請用100字以內(nèi)文字解釋你的觀點(diǎn)(若存在問題,應(yīng)說明如何修改“客房”關(guān)系模式)。
信管網(wǎng)參考答案:
查看解析:
m.xiexiliangjiufa.com/st/3817019868.html
3、閱讀下列說明,回答問題1至問題3,將解答填入答題紙的對應(yīng)欄內(nèi)。
【說明】
某種出售罐裝飲料的自動售貨機(jī)( Vending Machine)的工作過程描述如下:
(1)顧客選擇所需購買的飲料及數(shù)量。
(2)顧客從投幣口向自動售貨機(jī)中投入硬幣(該自動售貨機(jī)只接收硬幣)。硬幣器收集投入的硬幣并計算其對應(yīng)的價值。如果所投入的硬幣足夠購買所需數(shù)量的這種飲料且飲料數(shù)量足夠,則推出飲料,計算找零,顧客取走飲料和找回的硬幣;如果投入的硬幣不夠或者所選購的飲料數(shù)量不足,則提示用戶繼續(xù)投入硬幣或重新選擇飲料及數(shù)量。
(3)一次購買結(jié)束之后,將硬幣器中的硬幣移走(清空硬幣器),等待下一次交易。自動售貨機(jī)還設(shè)有一個退幣按鈕,用于退還顧客所投入的硬幣。已經(jīng)成功購買飲料的錢是不會被退回的。
現(xiàn)采用面向?qū)ο蠓椒ǚ治龊驮O(shè)計該自動售貨機(jī)的軟件系統(tǒng),得到如圖3-1所示的用例圖,其中,用例“購買飲料”的用例規(guī)約描述如下。 參與者:顧客。 主要事件流:
1.顧客選擇需要購買的飲料和數(shù)量,投入硬幣;
2.自動售貨機(jī)檢查顧客是否投入足夠的硬幣;
3.自動售貨機(jī)檢查飲料儲存?zhèn)}中所選購的飲料是否足夠;
4.自動售貨機(jī)推出飲料;
5.自動售貨機(jī)返回找零。
各選事件流:
2a.若投入的硬幣不足,則給出提示并退回到1;
3a.若所選購的飲料數(shù)量不足,則給出提示并退回到1 。
根據(jù)用例“購買飲料”得到自動售貨機(jī)的4個狀態(tài):“空閑”狀態(tài)、“準(zhǔn)備服務(wù)”狀態(tài)、“可購買”狀態(tài)以及“飲料出售”狀態(tài),對應(yīng)的狀態(tài)圖如圖3-2所示。 所設(shè)計的類圖如圖3-3所示。
【問題1】(6分)
根據(jù)說明中的描述,使用說明中的術(shù)語,給出圖3-2中的S1~S4所對應(yīng)的狀態(tài)名。
【問題2】(4分)
根據(jù)說明中的描述,使用說明中的術(shù)語,給出圖3-2中的E1~E4所對應(yīng)的事件名 。
【問題3】(5分)
根據(jù)說明中的描述,使用說明中的術(shù)語,給出圖3-3中C1~C5所對應(yīng)的類名。
信管網(wǎng)參考答案:
查看解析:
m.xiexiliangjiufa.com/st/381716722.html
4、閱讀下列說明和C代碼,回答問題1至問題3,將解答寫在答題紙的對應(yīng)欄內(nèi)。
【說明】
模式匹配是指給定主串t和子串s,在主串t中尋找子串s的過程,其中s稱為模式。如果匹配成功,返回s在t中的位置,否則返回-1 。
KMP算法用next數(shù)組對匹配過程進(jìn)行了優(yōu)化。KMP算法的偽代碼描述如下:
1.在串t和串s中,分別設(shè)比較的起始下標(biāo)i=j=0。
2.如果串t和串s都還有字符,則循環(huán)執(zhí)行下列操作:
(1)如果j=-l或者t[i]=s[j],則將i和j分別加1,繼續(xù)比較t和s的下一個字符;
(2)否則,將j向右滑動到next[j]的位置,即j =next[j]。
3.如果s中所有字符均已比較完畢,則返回匹配的起始位置(從1開始);否則返回-1。其中,next數(shù)組根據(jù)子串s求解。求解next數(shù)組的代碼已由get_next函數(shù)給出。
【C代碼】
(1)常量和變量說明
t,s:長度為憫鉑Is的字符串
next:next數(shù)組,長度為Is
(2)C程序
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*求next[]的值*/
void get_next( int *next, char *s, int Is) {
int i=0,j=-1;
next[0]=-1;/*初始化next[0]*/
while(i < ls){/*還有字符*/
if(j==-1l ls[i]==s[j]){/*匹配*/
j++;
i++;
if( s[i]==s[j])
next[i] = next[j];
else
Next[i] = j;
}
else
j = next[j];
}
}
int kmp( int *next, char *t ,char *s, int lt, int Is )
{
Int i= 0,j =0
while (i < lt && (1) ) {
if( j==-1 || (2) ) {
i ++
j ++
} else
(3)
}
if (j >= ls)
return (4) else
return -1;
}
【問題1】(8分)
根據(jù)題干說明,填充C代碼中的空(1)~(4)。
【問題2】(2分)
根據(jù)題干說明和C代碼,分析出kmp算法的時間復(fù)雜度為(5)(主串和子串的長度分別為It和Is,用O符號表示)。
【問題3】(5分)
根據(jù)C代碼,字符串“BBABBCAC”的next數(shù)組元素值為(6)(直接寫素值,之間用逗號隔開)。若主串為“AABBCBBABBCACCD”,子串為“BBABBCAC”,則函數(shù)Kmp的返回值是(7)。
信管網(wǎng)參考答案:
查看解析:
m.xiexiliangjiufa.com/st/3817229374.html
5、閱讀下列說明和C++代碼,將應(yīng)填入 (n) 處的字句寫在答題紙的對應(yīng)欄內(nèi)。
【說明】
某發(fā)票(lnvoice)由抬頭(Head)部分、正文部分和腳注(Foot)部分構(gòu)成?,F(xiàn)采用裝飾( Decorator)模式實(shí)現(xiàn)打印發(fā)票的功能,得到如圖5-1所示的類圖。
【C++代碼】
#include <iostream>
using namespace std;
class Invoice{ public:
(1) {
cout<<"This is the content of the invoice!"<<endl;
}
};
class Decorator : public Invoice {
Invoice *ticket;
public:
Decorator(lnvoice *t) { ticket = t; }
void printInvoice(){
if(ticket != NULL) (2);
}
};
class HeadDecorator : public Decorator{
public:
HeadDecorator(lnvoice*t): Decorator(t) { }
void printInvoice() {
cout<< "This is the header of the invoice! "<< endl;
(3) ;
}
};
class FootDecorator : public Decorator{
public:
FootDecorator(Invoice *t): Decorator(t) { }
void printlnvoice(){
(4) ;
cout<< "This is the footnote of the invoice!"<< endl;
}
};
int main(void) {
Invoice t;
FootDecorator f(&t);
HeadDecorator h(&f);
h.printInvoice();
cout<<”------------------------”<<endl;
FootDecorator a(NULL)
HeadDecorator b( (5) );
b.printInvoice();
return 0;
}
程序的輸出結(jié)果為:
This is the header of the invoice!
This is the content of the invoice!
This is the footnote of the invoice!
----------------------------
This is the header of the invoice!
This is the footnote of the invoice!
【說明】
某發(fā)票(lnvoice)由抬頭(Head)部分、正文部分和腳注(Foot)部分構(gòu)成?,F(xiàn)采用裝飾( Decorator)模式實(shí)現(xiàn)打印發(fā)票的功能,得到如圖5-1所示的類圖。
【C++代碼】
#include <iostream>
using namespace std;
class Invoice{ public:
(1) {
cout<<"This is the content of the invoice!"<<endl;
}
};
class Decorator : public Invoice {
Invoice *ticket;
public:
Decorator(lnvoice *t) { ticket = t; }
void printInvoice(){
if(ticket != NULL) (2);
}
};
class HeadDecorator : public Decorator{
public:
HeadDecorator(lnvoice*t): Decorator(t) { }
void printInvoice() {
cout<< "This is the header of the invoice! "<< endl;
(3) ;
}
};
class FootDecorator : public Decorator{
public:
FootDecorator(Invoice *t): Decorator(t) { }
void printlnvoice(){
(4) ;
cout<< "This is the footnote of the invoice!"<< endl;
}
};
int main(void) {
Invoice t;
FootDecorator f(&t);
HeadDecorator h(&f);
h.printInvoice();
cout<<”------------------------”<<endl;
FootDecorator a(NULL)
HeadDecorator b( (5) );
b.printInvoice();
return 0;
}
程序的輸出結(jié)果為:
This is the header of the invoice!
This is the content of the invoice!
This is the footnote of the invoice!
----------------------------
This is the header of the invoice!
This is the footnote of the invoice!
信管網(wǎng)參考答案:
查看解析:
m.xiexiliangjiufa.com/st/3817318035.html
6、閱讀下列說明和java代碼,將應(yīng)填入 (n) 處的字句寫在答題紙的對應(yīng)欄內(nèi)。
【說明】
某發(fā)票(lnvoice)由抬頭(Head)部分、正文部分和腳注(Foot)部分構(gòu)成?,F(xiàn)采用裝飾(Decorator)模式實(shí)現(xiàn)打印發(fā)票的功能,得到如圖6-1所示的類圖。

【java代碼】 class invoice{
public void printInvoice(){
System.out.println ( "This is the content of the invoice!");
}
}
class Decorator extends Invoice {
protected Invoice ticket;
public Decorator(lnvoice t){
ticket = t; }
public void printInvoice(){
if(ticket != null)
(1) ;
}
}
class HeadDecorator extends Decorator{
public HeadDecorator(lnvoice t){
super(t);
}
public void printInvoice (){
Systent.out.println( "This is the header of the invoice! ");
(2) ;
}
}
class FootDecorator extends Decorator {
public FootDecorator(Invoice t){
super(t);
}
public void printlnvoice(){
( 3) ;
Systent.out.println( "This is the footnote of the invoice! ");
}
}
Class test {
public static void main(String[] args){
Invoice t =new Invioce();
Invoice ticket;
ticket= (4) ;
ticket.printInvoice();
Systent.out.println(“------------------“);
ticket= (5) ;
ticket.printInvoice(); } }
程序的輸出結(jié)果為:
This is the header of the invoice!
This is the content of the invoice!
This is the footnote of the invoice!
----------------------------
This is the header of the invoice!
This is the footnote of the invoice!
信管網(wǎng)參考答案:
查看解析:
m.xiexiliangjiufa.com/st/381743190.html