`
guoyiqi
  • 浏览: 1051267 次
社区版块
存档分类
最新评论

java程序代写(QQ:928900200)

 
阅读更多

1/4
Java Programming 2014
Course Code: EBU4201
Mini Project
Task 1 [30 marks]
SmileyCount is a simple application used by children to practise their counting and adding skills (see Figure 1).
Figure 1 First launch with some input values entered
A random number of Smiley images ranging from 1 to 10 are displayed for each operand and the user is expected to enter the values of the two operands and the result of adding the two operands, in the given text fields. When the user clicks on the button ‘Check!’, one of two things can happen:
Case 1: all three input values are correct
i) the text changes to ‘"Correct! Have another go?"’. ii) the number of Smiley images displayed for each of the two operands changes. See Figure 2 for an example.
iii) the three text fields are reset (i.e. they are left empty). Case 2: at least one of the input values entered is incorrect i) the text changes to ‘Wrong! Try again!’. ii) the number of Smiley images displayed does NOT change. iii) the text fields do NOT change.
2/4
Figure 2 Action following Case 1
Implement SmileyCount as a Java application. You application must satisfy ALL the specific requirements given below:
a) The title of the top-level container must be ‘Welcome to SmileyCount!’.
b) The initial text should be ‘Enter two operands, result and click on 'Check!'’. See Figure 1.
c) The maximum number of Smiley images per row is FOUR. See Hint 1.
d) The text fields should be wide enough to display at least TWO characters.
e) The button ‘Check!’ must not resize when the GUI is resized. See Hint 2 and Figure 3.
f) The ‘plus sign’ icon should appear vertically centered between the two sets of smiley images and must not resize when the GUI is resized. See Hint 2 and Figure 3.
g) When first launched and whenever a correct answer is given, the number of displayed Smiley images for each operand should change to any number between 1 and 10 (inclusive). See Hint 3 and Hint 4.
Note: It is possible for the next number(s) to be the same as the current number(s).
h) Nothing should happen if the user clicks the ‘Check!’ button while at least one of the text fields are empty, i.e. no errors should be thrown in this case. Note: You can assume that only a numeric value will be entered into the text fields.
Hint 1: Use an array of JLabel components for the Smiley images. The following constructor may be helpful for the ‘plus sign’ icon.
public JLabel(Icon image)
A Smiley image and ‘plus sign’ image will be provided. You must use these images.
Hint 2: Consider using containers within other containers and using layouts intelligently.
Hint 3: Suggested approach for displaying images: look up the following method in the class javax.swing.JLabel.
public void setIcon(Icon icon)
Hint 4: Suggested approaches for displaying a variable number of images: classes java.util.Random OR java.lang.Math.
3/4
Note: All the necessary files should be placed in a directory called Task1.You can choose whether to place the image files directly under Task1 or within a sub-directory. Whichever approach you take, the images must be displayed on the GUI without the markers having to move the image files to different locations within your directory structure. Also note that your application must run as expected from the command line.
Figure 3 GUI Resized
Task 2 [10 marks]
You may notice that entering a non-numeric value and clicking the ‘Check!’ button will cause a run-time error on the console. Therefore, your second task is to improve the application developed in Task 1 to ensure the user is only allowed to supply valid input values, i.e. a number between 1 and 10 (inclusive). The application must still function as specified in Task 1 although you may remove the ‘Check!’ button if you wish.
Hint: Use another appropriate component in place of the text field.
Note: All the necessary files (including any reused ones from Task 1) should be placed in a directory called Task2.
4/4
Documentation [10 marks]
You must include:
a. Generated Javadocs
b. Internal comments in your code.
c. User Manual. This should be no more than 2 pages and include how to run the program (both how to start and how to use it).
Note: All documentation files should be placed in a directory called Documentation.
Extra Credit [5 marks]
Extra marks from this section can be used to top up your final grade for this project. Maximum mark is still 50.
Further improve your application such that the maximum number of Smiley images displayed for each operand can be any number between 10 and 20 (inclusive), specified as a command line argument. E.g. assuming your class is called SmileyCountExtra, the command
Java SmileyCountExtra 25
will launch a GUI similar to Figure 1 where the maximum number of Smiley images displayed per operand will be 25. Whenever a correct answer is entered, the number of Smiley images per operand will change to any number between 1 and 25 (inclusive). The maximum number of images per row must now be FIVE.
If no command line argument is given OR a number outside the valid range is given, the program must terminate printing out an appropriate error message to the console. You can assume only a numeric value will be given as the argument.
Note: All the necessary files (including any reused ones from Task 1 and Task 2) should be placed in a directory called ExtraCredit.
Important notes:
1. All three directories must be included in a zip file. The filename must be your QM Student Number.
2. You should design your classes properly, following object oriented principles. E.g. do NOT write everything in the main method, keep code repetition to a minimum (i.e. use methods), do NOT use static methods unless there is a good reason. There will be marks allocated to good design.

分享到:
评论

相关推荐

    基于Java+Swing+mysql眼镜店管理系统V2.md

    眼镜店管理系统是基于Java、Swing以及MySQL数据库进行开发的应用程序,主要面向眼镜店的日常管理需求,提供了一系列功能包括但不限于管理员登陆、眼镜信息的查询、入库管理、销售管理以及信息删除等操作。...

    matlab精英保留代码-pb2b:Java网络

    代做各类CS相关课程和程序语言 QQ: 1823890830 微信: qiushiwenmeng 专业过硬, 英语精通。代写5年来, 累计完成近万份大小project assignment, 客户来自美国, 加拿大, 英国, 澳洲, 新西兰等近百所大学, 得到广大留学...

    基于java+swing飞机大战游戏(含课程报告).md

    他注重代码规范、性能优化和代码重构,为学生和开发者提供全方位的技术支持和交流,提供包括但不限于毕业设计、课程作业、期末大作业的代写代做、学习资料、程序开发、技术解答、代码讲解和文档报告等专业服务。...

    基于python+tkinter+mysql的学生信息管理系统(高分课程设计).md

    博主还提供包括毕业设计、课程作业、期末大作业的代写代做以及学习资料、程序开发、技术解答、代码讲解、文档报告等专业服务,并且可以在文章末尾联系博主。 文章中详细展示了系统的运行效果,包括用户登录界面、...

    基于Php+Mysql+html学生信息管理系统【期末大作业】.md

    此外,博主还提供了多个其他系统实现的链接,这些系统同样采用Java+Swing技术栈,包括学生选课管理系统、教务管理系统、成绩管理系统、用户信息管理系统、五子棋游戏、银行管理系统、仿QQ聊天工具以及聊天室等。...

Global site tag (gtag.js) - Google Analytics