`

SSD04 Exercise05 个人解答

阅读更多

Take Assessment: Exercise 5

 

Time Zone Editor

Description

This assignment is to create an interface for entering a time zone.  This interface is patterned after the interface found in the standard Windows Date/Time Control Panel.  (To see this control panel, click on the "Start" button, then "Settings", then "Control Panel".  Double click on the "Date / Time" control panel.  Finally, click on the "Time Zone" tab at the top.)  You should create an interface with the components of the "Time Zone" tab, but not the tabbed dialog box or the other parts of the interface that allow the user to set the time and date.  As shown below, these components include a ComboBox for selecting a time zone by name, a map image, a CheckBox for indicating whether the system automatically updates its time to reflect daylight savings time (in time zones that have daylight savings time), and a set of  "OK", "Cancel", and "Apply" buttons.

 

Time Zone Editor

Description

This assignment is to create an interface for entering a time zone.  This interface is patterned after the interface found in the standard Windows Date/Time Control Panel.  (To see this control panel, click on the "Start" button, then "Settings", then "Control Panel".  Double click on the "Date / Time" control panel.  Finally, click on the "Time Zone" tab at the top.)  You should create an interface with the components of the "Time Zone" tab, but not the tabbed dialog box or the other parts of the interface that allow the user to set the time and date.  As shown below, these components include a ComboBox for selecting a time zone by name, a map image, a CheckBox for indicating whether the system automatically updates its time to reflect daylight savings time (in time zones that have daylight savings time), and a set of  "OK", "Cancel", and "Apply" buttons.

 

Based on user actions, you should keep track of:

  • The index of the currently selected time zone
  • The offset in minutes from GMT for the currently-selected time zone
  • The title of the time zone

For this assignment, you should display the map, but you do not need to move the map to reflect the current time zone as is done in the original interface.  When the currently selected time zone does not use daylight savings time, the "Automatic adjustment" CheckBox should be disabled as shown above.  In other cases, this CheckBox should remain enabled.

When the user presses the "OK" or "Cancel" buttons, you should produce a small report of the current settings (similar to the one shown below), and then exit the interface (by "unloading" the form).  If the user presses the "Apply" button, you should produce a similar report but not exit the interface.  The report can be created using the MsgBox() subroutine provided by Visual Basic.  This routine will take a single string as a parameter and display that string along with an "OK" button.


Resources

The data tables and other resources provided below are intended to be cut from this page and pasted into your code or the Visual Basic property sheet editor.  Note that properties that have list values will accept pasting of multiple line text (e.g., cut from the text below) to fill the values for those lists.  To do this, click on the property value.  This will make a "down arrow" appear.  Press on this "down arrow," then click on the first line of the menu that appears (or highlight all the items in the menu if you wish to replace a set of existing entries). Finally, paste your text.  Take care not to introduce extra blank items and not to miss any items when cutting and pasting.

  • Time zone titles (for time zones 0 to 49 in order)

(GMT -12:00) Eniwetok, Kwajalein
(GMT -11:00) Midway Island, Samoa
(GMT -10:00) Hawaii
(GMT -09:00) Alaska
(GMT -08:00) Pacific Time (US and Canada); Tijuana
(GMT -07:00) Arizona
(GMT -07:00) Mountain Time (US and Canada)
(GMT -06:00) Central Time (US and Canada)
(GMT -06:00) Mexico City, Tegucigalpa
(GMT -06:00) Saskatchewan
(GMT -05:00) Bogota, Lima
(GMT -05:00) Eastern Time (US and Canada)
(GMT -05:00) Indiana (East)
(GMT -04:00) Atlantic Time (Canada)
(GMT -04:00) Caracas, La Paz
(GMT -03:30) Newfoundland
(GMT -03:00) Brasilia
(GMT -03:00) Buenos Aires, Georgetown
(GMT -02:00) Mid-Atlantic
(GMT -01:00) Azores, Cape Verde Is.
(GMT +00:00) Greenwich Mean Time; Dublin, Edinburgh, London, Lisbon
(GMT +00:00) Monrovia, Casablanca
(GMT +01:00) Berlin, Stockhold, Rome, Bern, Brussels, Vienna
(GMT +01:00) Paris, Madrid, Amsterdam
(GMT +01:00) Prage, Warsaw, Budapest
(GMT +02:00) Athens, Helsinki, Istanbul
(GMT +02:00) Cairo
(GMT +02:00) Eastern Europe
(GMT +02:00) Harare, Pretoria
(GMT +02:00) Israel
(GMT +03:00) Baghdad, Kuwait, Nairobi, Riyadh
(GMT +03:00) Moscow, St. Petersburgh, Kazan, Volgograd
(GMT +03:00) Tehran
(GMT +04:00) Abu Dhabi, Muscat, Tbilisi
(GMT +04:30) Kabul
(GMT +05:00) Islamabad, Karachi, Ekaterinburg, Tashkent
(GMT +05:30) Bombay, Calcutta, Madras, New Delhi, Colombo
(GMT +06:00) Almaty, Dhaka
(GMT +07:00) Bangkok, Jakarta, Hanoi
(GMT +08:00) Beijing, Chongqing, Urumqi
(GMT +08:00) Hong Kong, Perth, Singapore, Taipei
(GMT +09:00) Tokyo, Osaka, Sapporo, Seoul, Yakutsk
(GMT +09:30) Adelaide
(GMT +09:30) Darwin
(GMT +10:00) Brisbane, Melbourne, Sydney
(GMT +10:00) Guam, Port Moresby, Vladivostok
(GMT +10:00) Hobart
(GMT +11:00) Magadan, Solomon Is., New Caledonia
(GMT +12:00) Fiji, Kamchatka, Marshall Is.
(GMT +12:00) Wellington, Auckland

 
  • Time zone offsets in minutes from GMT (for time zones 0 to 49 in order)

-720
-660
-600
-540
-480
-420
-420
-360
-360
-360
-300
-300
-300
-240
-240
-210
-180
-180
-120
-060
+000
+000
+060
+060
+060
+120
+120
+120
+120
+120
+180
+180
+180
+240
+270
+300
+330
+360
+420
+480
+480
+540
+570
+570
+600
+600
+600
+660
+720
+720

 
  • Initialization code for daylight savings time flags

    For i = 0 To 49
        hasSavingsTime(i) = True
    Next i
    hasSavingsTime(0)  = False ' (GMT -12:00) Eniwetok, Kwajalein
    hasSavingsTime(1)  = False ' (GMT -11:00) Midway Island, Samoa
    hasSavingsTime(2)  = False ' (GMT -10:00) Hawaii
    hasSavingsTime(5)  = False ' (GMT -07:00) Arizona
    hasSavingsTime(8)  = False ' (GMT -06:00) Mexico City, Tegucigalpa
    hasSavingsTime(9)  = False ' (GMT -06:00) Saskatchewan
    hasSavingsTime(10) = False ' (GMT -05:00) Bogota, Lima
    hasSavingsTime(12) = False ' (GMT -05:00) Indiana (East)
    hasSavingsTime(14) = False ' (GMT -04:00) Caracas, La Paz
    hasSavingsTime(17) = False ' (GMT -03:00) Buenos Aires, Georgetown
    hasSavingsTime(21) = False ' (GMT +00:00) Monrovia, Casablanca
    hasSavingsTime(28) = False ' (GMT +02:00) Harare, Pretoria
    hasSavingsTime(30) = False ' (GMT +03:00) Baghdad, Kuwait, Nairobi, Riyadh
    hasSavingsTime(33) = False ' (GMT +04:00) Abu Dhabi, Muscat, Tbilisi
    hasSavingsTime(34) = False ' (GMT +04:30) Kabul
    hasSavingsTime(35) = False ' (GMT +05:00) Islamabad, Karachi, Ekaterinburg, Tashkent
    hasSavingsTime(36) = False ' (GMT +05:30) Bombay, Calcutta, Madras, New Delhi, Colombo
    hasSavingsTime(37) = False ' (GMT +06:00) Almaty, Dhaka
    hasSavingsTime(38) = False ' (GMT +07:00) Bangkok, Jakarta, Hanoi
    hasSavingsTime(40) = False ' (GMT +08:00) Hong Kong, Perth, Singapore, Taipei
    hasSavingsTime(41) = False ' (GMT +09:00) Tokyo, Osaka, Sapporo, Seoul, Yakutsk
    hasSavingsTime(43) = False ' (GMT +09:30) Darwin
    hasSavingsTime(45) = False ' (GMT +10:00) Guam, Port Moresby, Vladivostok
    hasSavingsTime(47) = False ' (GMT +11:00) Magadan, Solomon Is., New Caledonia
    hasSavingsTime(48) = False ' (GMT +12:00) Fiji, Kamchatka, Marshall Is.

 
  • Map image



This image is scaled with each pixel corresponding to one degree of longitude.

  • An executable like the application you are asked to create, click Ex5.exe . (From Internet Explorer, select the "Run this program" option of the "File download" dialog box that appears—from Netscape, save and double-click the file Ex5.exe.)

Submission

Submit the following files:

  • 大小: 41.2 KB
  • 大小: 17.9 KB
  • 大小: 2.9 KB
分享到:
评论
1 楼 qianjigui 2008-12-22  
Feedback for Exercise 5 (v2.0)
Total Score: 91/100

    * Elements
      Score: 30/30

    * Function
      Score: 55/60

          o ComboBox
            Score: 5/10
            The combo box exhibits some other minor flaw, such as the 'style' property is set to allow the user to type text into the ComboBox. -5

          o CheckBox
            Score: 10/10

          o "OK" Button
            Score: 10/10

          o "Cancel" Button
            Score: 10/10

          o "Apply" Button
            Score: 10/10

          o Settings Report
            Score: 10/10

    * General Issues
      Score: 6/10

          o Good Programming Practices
            Score: 3/3

          o Good Usability Practices
            Score: 0/4
            The OK button is not the default. -1
            The OK button Caption does not have an access key. -1
            The Cancel button Caption does not have an access key. -1
            The Apply button Caption does not have an access key. -1

          o Submission Completeness
            Score: 3/3

相关推荐

    SSD06 Exercise05 个人解答

    【标题】"SSD06 Exercise05 个人解答"主要涵盖了两个关键知识点:源码分析和工具使用。在这个练习中,作者分享了他对某个特定编程问题或项目的解答,这通常涉及深入理解代码的运作机制,包括算法、数据结构以及编程...

    SSD04 Exercise04 个人解答

    【标题】"SSD04 Exercise04 个人解答"主要涵盖了两个关键知识点:源码理解和工具使用。在这个练习中,作者分享了他们对于特定编程问题的解决方案,可能涉及编程语言的深入理解、代码调试技巧以及如何有效地利用开发...

    SSD04 Exercise06 个人解答

    标题“SSD04 Exercise06 个人解答”暗示了一个编程练习或项目,其中涉及到对Microsoft Calendar Control 10.0的使用。这个控制组件通常用于Windows应用程序开发,特别是使用Visual Basic 6 (VB6) 或其他支持ActiveX...

    SSD04 Exercise03 个人解答

    【标题】"SSD04 Exercise03 个人解答"主要涵盖了两个关键概念:源码分析和工具使用。这可能是某个课程或项目中的一个练习,其中"SSD04"可能代表课程编号或者阶段,而"Exercise03"则指示这是第三次实践任务。解答者...

    SSD06 Exercise04 个人解答

    标题 "SSD06 Exercise04 个人解答" 暗示这可能是一个关于软件开发或编程练习的解答,特别是涉及到性能分析或者优化的环节。描述中的 "NULL" 没有提供额外的信息,但我们可以从标签 "源码" 和 "工具" 中推测,这个...

    SSD04 Exercise01 个人解答

    这是我的解答 博文链接:https://qianjigui.iteye.com/blog/248917

    SSD04 Exercise08 个人解答

    【SSD04 Exercise08 个人解答】 在这个学习实践中,我们主要关注的是与源码分析和工具使用相关的知识。这个题目可能源自于一个软件开发或计算机科学的课程,其中"SSD04"可能是课程代码,而"Exercise08"指的是第八个...

    SSD06 Exercise02 个人解答

    【标题】"SSD06 Exercise02 个人解答"主要涵盖了两个关键概念:源码分析和工具使用。这可能是某个课程或项目练习的一部分,其中作者Qianjigui分享了他在解决特定编程问题或实现某功能时的经验和理解。 在源码分析...

    SSD06 Exercise03 个人解答

    标题“SSD06 Exercise03 个人解答”暗示了一个编程练习或课程作业,其中可能涉及 SSD(固态存储)相关的技术,而 Exercise03 可能是该系列练习中的第三个部分。描述提到的“Ubuntu8.04+Gcc+Gdb”是一个古老的Linux...

    SSD06 Exercise01 个人解答

    NULL 博文链接:https://qianjigui.iteye.com/blog/256678

    SSD04 Exercise02 个人解答

    我的解答 博文链接:https://qianjigui.iteye.com/blog/248918

Global site tag (gtag.js) - Google Analytics