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

MATH QUIZ java

 
阅读更多

木其工作室 qq:928900200

ITE3101-Introduction to Programming Assignment (14/15) Ver. 1.0 (last updated: 22-Oct-2014) ITE3103 Programming Assignment v1.0 Page 1 of 5 Last updated: 3Oct14 Deadline: 5-Dec-2014 (Friday), 13:30 Instructions to Students 1. This assignment should be done by each individual student. 2. Plagiarism will be treated seriously. All assignments that have been found involved wholly or partly in plagiarism (no matter these assignments are from the original authors or from the plagiarists) will score Zero marks. You may be asked some random questions on your program to verify that your submission is your own work. 3. Your program must use JDK 1.6 or above to develop. 4. Your program must be structured and well documented. The first few lines in the source file must be a comment block stating the name of the source file, your name, course, class, and student ID. Marks will be deducted if such comments are not included. 5. You are required to hand in the following: a. Program codes .java file(s) (softcopy) b. Documentations (softcopy) on the program i. Evidence of testing (e.g. screen captures of test cases). ii. A simple User Guide for your program. 6. The source code filename should be MathQuiz.java. 7. Zip all your files and submit to moodle.vtc.edu.hk on or before the deadline. LATE SUBMISSION IS NOT ACCEPTED. 8. Weight of this Assignment: 20% of Total Assessment. MATH QUIZ Distribution of marks: 70% for program codes 10% for checking input errors and giving suitable messages to the user 10% for the evidence of testing 10% for the User Guide Problem Specification You are asked to design and develop a Java Program that randomly generates simple Math questions and display the mark of a quiz. The program is divided into 5 major steps. Step 1: Display a Main Menu and Prompt the Question Type When the program starts, a Main Menu will be shown as follows: Welcome to Math Quiz ==| Main Menu |== A) Square Root B) Maximum Prime Number C) Highest Common Factor (HCF) D) Random Questions in (A)-(C) Q) Quit Option: _ Figure 1. Main Menu ITE3101-Introduction to Programming Assignment (14/15) Ver. 1.0 (last updated: 22-Oct-2014) ITE3103 Programming Assignment v1.0 Page 2 of 5 Last updated: 3Oct14 You have to handle the following user inputs: User Input Action 'A' or 'a'  Proceeds to Step 2  Generated Square Root questions in Step 3  Example: Q1: the square root of 16 = … Q5: the square root of 4 = 'B' or 'b'  Proceeds to Step 2  Generated Maximum Prime Number questions in Step 3  Example: Q1: the maximum prime number small than or equal to 25 = … Q7: the maximum prime number small than or equal to 99 = 'C' or 'c'  Proceeds to Step 2  Generated HCF questions in Step 3  Example: Q1: the HCF of 16 and 24 = … Q3: the HCF of 99 and 81 = 'D' or 'd'  Proceeds to Step 2  Randomly generated types 1 to 3 questions in Step 3  Example: Q1: the HCF of 16 and 24 = Q2: the square root of 16 = … Q10: the maximum prime number small than or equal to 88 = 'Q' or 'q'  Display a “Good-Bye” message and quit the program Step 2: Prompt the Number of Questions After selecting the type of questions in Step 1, the user should enter the number of questions as follows: Number of Questions: _ Figure 2. Number of Questions For example, if the user enters 5, then 5 different questions of the chosen question type will be asked in Step 3. Step 3: Generate Random Questions n questions will be generated, where n is entered in Step 2. The questions generated are based on the input in Step 1. For example: If the user entered 'C' or 'c' (i.e. HCF) in Step 1 and 5 in Step 2, then 5 HCF questions will be asked in Step 3. ITE3101-Introduction to Programming Assignment (14/15) Ver. 1.0 (last updated: 22-Oct-2014) ITE3103 Programming Assignment v1.0 Page 3 of 5 Last updated: 3Oct14 Note that each question should have a question number as follows: Q1: the square root of 4 = 2 Q2: the square root of 16 = 4 … Q5: the square root of 81 = _ Figure 3. Generate Random Questions Number(s) generated in different type of questions should follow the following rules: Operator Operands Square Root The number should be 1, 4, 9, 16, 25, 36, 49, 64 or 81 Maximum Prime Number The number should be between 2 and 99 HCF Two numbers between 2 and 99 Step 4: Display the Results Your program should check the correctness of all answers entered by the user in Step 3. The result should be shown as follows: Example 1 … Q5: the square root of 4 = 2 You answered 5 questions 5 of them are correct Your mark is 100.0% Example 2 … Q3: the maximum prime number small than or equal to 25 = 23 You answered 3 questions 2 of them are correct Your mark is 66.7% The result should contain (1) how many questions have been asked, (2) how many questions are correct and (3) the percentage of correct answers (in 1 decimal place). After Step 4 is completed, the program goes back to Step 1 to display the Main Menu again. Hints: 1. Write a method to generate random numbers in a given range (i.e. start and end); this method will be called in Step 3. *** END *** 1 2 3

分享到:
评论

相关推荐

    Math-Quiz.rar_Math_quiz C#

    《C#实现Math Quiz:基于msdn的四个参考例程》 在编程世界里,C#是一种广泛应用的编程语言,尤其在开发Windows应用程序和游戏时。本次我们将探讨一个以“Math Quiz”为主题的C#项目,它源自msdn(微软开发者网络)...

    Java Quiz.java

    Java Quiz.java

    math-quiz

    "math-quiz" 是一个基于Java开发的数学测验项目,它可能是一个用于教育或自我提升的软件应用,让用户可以通过互动的方式进行数学练习。这个项目的源代码存储在名为"math-quiz-master"的压缩包中,暗示着这是一个版本...

    Quiz-Java-CODES.rar_quiz

    这个"Quiz-Java-CODES.rar_quiz"压缩包文件显然包含了一些Java编程用于创建测验或问答应用的示例代码。让我们深入探讨一下这个主题,了解Java在构建问答系统时可能涉及的关键知识点。 1. **Java基础**:首先,理解...

    Simple Math Quiz using HTMLJavaScript with Source Code.zip

    JavaScript

    java quiz(基本概念选择题)

    这个"java quiz(基本概念选择题)"资源提供了一种互动的方式来测试和加深你对Java基础知识的理解。下面,我们将深入探讨Java的一些核心概念,这些概念在选择题中可能会出现。 1. **类与对象**:Java中的所有程序都是...

    CIC Java Reskill Program Java Quiz_201609290020.xlsx

    CIC Java Reskill Program Java Quiz it is easy to understand

    ssd3 practical quiz 6

    ssd3 practical quiz 5ssd3 practical quiz 5ssd3 practical quiz 5ssd3 practical quiz 5ssd3 practical quiz 5ssd3 practical quiz 5ssd3 practical quiz 5

    ssd3 practical quiz 1

    ssd3 practical quiz 1ssd3 practical quiz 1ssd3 practical quiz 1ssd3 practical quiz 1ssd3 practical quiz 1 ssd3 practical quiz 1

    SSD3 Practical Quiz 9 EmployeeFileIO.Java 不坑人

    【标题】"SSD3 Practical Quiz 9 EmployeeFileIO.java 不坑人" 涉及的是一个关于固态存储技术(Solid State Drives, SSDs)的实践考核题目,其中的核心是`EmployeeFileIO.java`这个Java源代码文件。在IT领域,特别是...

    Quiz Java - Promotori Finanziari Edition-开源

    《Quiz Java - Promotori Finanziari Edition》是一款专为理财规划师考试设计的开源测验软件。这个程序提供了一个方便的平台,帮助用户通过多选题的方式进行自我测试和学习,以提升对金融理财知识的理解和掌握。下面...

    ssd3 practical quiz7答案

    【标题】"ssd3 practical quiz7答案"涉及的知识点主要与软件开发和编程相关,尤其是Java编程语言。Quiz7可能是一个在线课程或教程的一部分,专注于数据结构和算法的应用,特别是数组列表的操作。 【描述】提到这个...

    应用程序-Java-Quiz-V2

    `应用程序-Java-Quiz-V2`是一个使用Java编程语言开发的Quiz应用的升级版。它涉及到Java的基础知识、GUI设计、版本控制、构建工具、测试、资源管理和现代开发流程。这个项目展示了Java在创建交互式应用方面的灵活性和...

    Math-Quiz-4

    【标题】"Math-Quiz-4" 指的可能是一个数学测验应用或网站的第四版,专门设计用于提供数学练习和测试。这个项目很可能使用了HTML(超文本标记语言)来构建用户界面和页面结构,使得用户可以通过网页进行互动。 ...

    SSD3 Practical Quiz8

    SSD3 Practical Quiz8 2009 StudentArrayList.java

    SSD3 Practical Quiz 8 答案

    在本次实践测验中,我们关注的是"Move.java"这个文件,这通常意味着我们正在处理一个与Java编程相关的任务,可能涉及到对象移动、位置操作或者游戏开发中的某种逻辑。让我们深入探讨这个知识点。 首先,Java是一种...

    math-quiz-1

    【标题】"math-quiz-1" 指的可能是一个数学测验程序或网站的首个版本,可能是用于教育或娱乐目的,让用户解答数学问题。这个项目的核心是使用HTML(超文本标记语言)来构建用户界面,使得用户可以通过网页进行交互。...

    ssd3 quiz4答案

    6. **编程语言特性**:根据课程内容,可能涉及某种特定编程语言(如Java、Python或C++)的关键特性和最佳实践。 7. **软件测试**:单元测试、集成测试和系统测试是保证软件质量的重要手段。Quiz 4可能会考察测试...

    sdd3 quiz9答案

    在本次的"ssd3 practical quiz9"中,我们关注的是一个名为"employeeIO.java"的文件,这与之前的"employee.java"有所不同。这个题目似乎着重于输入/输出(I/O)操作,这是Java编程中的一个重要领域,特别是在处理数据...

    ssd3 practical quiz 3

    ssd3 practical quiz 3ssd3 practical quiz 3ssd3 practical quiz 3ssd3 practical quiz 3ssd3 practical quiz 3ssd3 practical quiz 3ssd3 practical quiz 3

Global site tag (gtag.js) - Google Analytics