搜题
第1题
第2题
试题六(共15分)
阅读下列说明和Java代码,将应填入(n)处的字句写在答题纸的对应栏内。
【说明】
现欲开发一个软件系统,要求能够同时支持多种不同的数据库,为此采用抽象工厂模式设计该系统。以SQL Server和Access两种数据库以及系统中的数据库表Department为例,其类图如图6-1所示。

【Java代码】
import java.util.*;
class Department{/*代码省略*/}
interface IDepartment{
(1) ;
(2) ;
}
class SqlserverDepartment (3) {
public voidInsert(Department department){
System.out.println(”Insert a record into Department in SQL Server!");
∥其余代码省略
}
public Department GetDepartment(int id){
/*代码省略*/
}
}
classAccessDepartment(4) {
public void Insert(Department department){
System.out.println("Insert a record into Department in ACCESS!”);
∥其余代码省略
}
public Department GetDepartment(int id){
/*代码省略*/
}
}
(5) {
(6) ;
}
class SqlServerFactory implements IFactory{
public IDepartment CreateDepartment(){
retum new SqlserverDepartment();
}
∥其余代码省略
}
class AccessFactory implements IFactory{
public IDepartment CreateDepartment(){
return new AccessDepartment();
}
∥其余代码省略
}
第3题
试题六(共15分)
阅读下列说明和Java代码,将应填入 (n) 处的字句写在答题纸的对应栏内。
【说明】
某发票(lnvoice)由抬头(Head)部分、正文部分和脚注(Foot)部分构成。现采用装饰(Decorator)模式实现打印发票的功能,得到如图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 FootDecorator extends Decorator{
public FootDecorator(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 header 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();
}
}
程序的输出结果为:
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!
第4题
试题五(共15分)
阅读下列说明,回答问题1至问题4,将解答填入答题纸的对应栏内。
【说明】
当前,无论是政府、企业、学校、医院,还是每个人的生活,无不受信息化广泛而深远的影响。
信息化有助于推进四个规代化,同时也有赖于广泛应用现代信息技术。信息化既涉及国家信息化、国民经济信息化、社会信息化,也涉及企业信息化、学校信息化、医院信息化等。
国家信息化就是在国家统一规划和组织下,在农业、工业、科学技术、国防和社会生活各个方面应用现代信息技术,深入开展、广泛利用信息资源,发展信息产业,加速实现国家现代化的过程。
而企业信息化是挖掘企业先进的管理理念,应用先进的计算机网络技术整合企业现有的生产、经营、设计、制造、管理,及时地为企业的“三层决策”系统提供准确而有效的数据信息附程。
【问题1】(5分)
本题说明中关于国家信息化的定义包含了哪四个方面的含义?
【问题2】(3分)
企业的“三层决策”系统指的是哪三个层次?
【问题3】(3分)
企业的信息化有不同的分类方式,可按企业所处行业分类,或按企业的运营模式分类。下列企业信息化的类型,哪些是按照所处的行业划分的?哪些是按照企业的运营模式划分的?
A. 离散型企业的信息化
B. 流趟企蝉信息化
C. 制造业的信息化
D. 商业的信息化
E. 金融业的信息化
F. 服务业的信息化
【问题4】(4分)
在企业信息化建设中,目前比较常用的企业信息化建设的应用软件主要有ERP,CRM,SCM和ABC,请分别写出它们的中文名称。
第5题
试题五(共15分)
阅读下列说明,回答问题 1 至问题3,将解答填入答题纸的对应栏内。
【说明】
辉映公司是一家大型超市,该公司近年收购了多家小型超市,目前需要进行电子商务平台横向联网的整合和相关应用软件开发。项目计划从 2009 年1 月1 日开始,至 2010 年10月 31 日完成,持续 22个月。表 5-1所列是项目中每项任务持续时间和每月人员需求数。

每项任务的逻辑关系和部分时间信息如图 5-1 所示。

【问题 1】 (6 分)
请根据图 5-1的项目任务逻辑关系,计算并填写图 5-1 中(1)~(6)处空缺。
【问题 2】 (3.5 分)
根据图 5-1 中的最早开始时间画出该项目甘特图。

【问题 3】 (5.5 分)
开始时间的甘特图,计算每月人工需求量并填写表 5-2中(7) ~ (17)

第6题
试题五(共15分)
阅读以下说明,回答问题1至问题3,将解答填入答题纸的对应栏内。
【说明】
小明在一家超市工作,该超市将进行整体改造,小明负责信息系统软硬件升级,他制定的工作计划如表5.1所示。

每项任务的逻辑关系和部分时间信息如图5-1所示。

【问题1】 (10分)
请根据表5-1和图5-1,计算各项任务的最迟开始时间和最迟结束时间,填充图5-1中的空(1)~(10)。
第7题
试题六(共15分)
阅读下列说明和Java代码,将应填入(n)处的字句写在答题纸的对应栏内。
【说明】
某咖啡店当卖咖啡时,可以根据顾客的要求在其中加入各种配料,咖啡店会根据所加入的配料来计算费用。咖啡店所供应的咖啡及配料的种类和价格如下表所示。

【Java代码】
import java.util.*;
(1) class Beverage { //饮料
String description = "Unknown Beverage";
public (2) (){return description;}
public (3) ;
}
abstract class CondimentDecorator extends Beverage { //配料
(4) ;
}
class Espresso extends Beverage { //蒸馏咖啡
private final int ESPRESSO_PRICE = 25;
public Espresso() { description="Espresso"; }
public int cost() { return ESPRESSO_PRICE; }
}
class DarkRoast extends Beverage { //深度烘焙咖啡
private finalint DARKROAST_PRICE = 20;
public DarkRoast() { description = "DarkRoast"; }
public int cost(){ rcturn DARKROAST PRICE; }
}
class Mocha extends CondimentDecorator { //摩卡
private final int MOCHA_PRICE = 10;
public Mocha(Beverage beverage) {
this.beverage = beverage;
}
public String getDescription() {
return beverage.getDescription0 + ", Mocha";
}
public int cost() {
return MOCHA_PRICE + beverage.cost();
}
}
class Whip extends CondimentDecorator { //奶泡
private finalint WHIP_PRICE = 8;
public Whip(Beverage beverage) { this.beverage = beverage; }
public String getDescription() {
return beverage.getDescription()+", Whip";
}
public int cost() { return WHIP_PRICE + beverage.cost(); }
}
public class Coffee {
public static void main(String args[]) {
Beverage beverage = new DarkRoast();
beverage=new Mocha(5 );
beverage=new Whip (6 );
System.out.println(beverage.getDescription() +"¥" +beverage.cost());
}
}
编译运行上述程序,其输出结果为:
DarkRoast, Mocha, Whip ¥38
第8题
试题五(共15分)
阅读下列说明和C++代码,将应填入(n)处的字句写在答题纸的对应栏内。
【说明】
现欲开发一个软件系统,要求能够同时支持多种不同的数据库,为此采用抽象工厂模式设计该系统。以SQL Server和Access两种数据库以及系统中的数据库表Department为例,其类图如图5-1所示。

【C++代码】
include <iostream>
using namespace std;
class Department{/*代码省略*/};
class IDepartment{
public:
(1) =0;
(2) =0;
};
class SqlserverDepartment:(3){
public:
void Insert(Department* department){
cout <<"Insert a record into Department in SQL Server!\n";
∥其余代码省略
}
Department GetDepartment(int id){
/*代码省略*/
}
};
class AccessDepartment: (4) {
public:
void Insert(Department* department){
cout <<"Insert a record into Department in ACCESS!\n";
∥其余代码省略
}
Department GetDepartment(int id){
/*代码省略*/
}
};
(5){
public:
(6)=0;
};
class SqlServerFactory:public IFactory{
public:
IDepartment*CreateDepartment(){ return new SqlserverDepartment(); }
∥其余代码省略
};
class AccessFactory:public IFactory{
public:
IDepartment* CreateDepartment(){ return new AccessDepartment();}
∥其余代码省略
};
第9题
试题八(共15分)
阅读以下说明和Java程序代码,将应填入(n) 处的字句写在答题纸的对应栏内。
[说明]
在下面的 Java 程序代码中,类SalesTicket 能够完成打印票据正文的功能,类HeadDecorator 与FootDecorator 分别完成打印票据的台头和脚注的功能。已知该程序运行后的输出结果如下所示,请填补该程序代码中的空缺。这是票据的台头!这是票据正文!这是票据的脚注!------------------------这是票据的台头!
这是票据的脚注!
[Java程序代码]
public class SalesTicket {
public void printTicket() {
System.out.println("这是票据正文!");
}
}
public class Decorator extends SalesTicket{
SalesTicket ticket;
}
}
public class FootDecorator extends Decorator{
public FootDecorator(SalesTicket t) {
(2) ;
}
public void printTicket() {
super.printTicket();
System.out.println("这是票据的脚注!");
}
}
public class Main {
public static void main(String[] args) {
T = new HeadDecorator((3) );
T. (4) ;
System.out.println("------------------------");
T = new FootDecorator((5) );
T.printTicket();
}
}
public Decorator(SalesTicket t){
ticket = t;
}
public void printTicket(){
if(ticket != null)
ticket.printTicket();
}
}
public class HeadDecorator extends Decorator{
public HeadDecorator(SalesTicket t) {
(1) ;
}
public void printTicket() {
System.out.println("这是票据的台头!");
super.printTicket();
第10题
试题五(共15分)
阅读下列说明和C++-代码,将应填入 (n) 处的字句写在答题纸的对应栏内。
【说明】
某发票(lnvoice)由抬头(Head)部分、正文部分和脚注(Foot)部分构成。现采用装饰(Decorator)模式实现打印发票的功能,得到如图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 printinvoice0 {
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.printlnvoice();
cout< < “_____”< < endl;
FootDecorator a(NULL);
HeadDecorator b((5) );
B.printinvoice();
return 0;
}
程序的输出结果为:
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!
警告:系统检测到您的账号存在安全风险
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!