FACULTY OF BUSINESS ADMINISTRATION
ISOM3028 ADVANCED COMPUTER PROGRAMMING
ASSIGNMENT ONE (SECOND SEMESTER 2022/2023)
DUE ON MAR. 18, 2023 BY MID-NIGHT (23:59) SUBMITTED VIA MOODLE
Submission Instructions & Requirements:
Q1703105484
- You are required to submit all your works for the assignment in a number of files (i.e. a document file and a number of java coding files, with one for each of the individual question of the assignment).
- For consistent, make sure that you named your files all-in lower-case letters in the format as “ab123456 assign01.docx” for the document file, and as “ab123456 assign01-q01.java”, “ab123456 assign01-q02.java” and “ab123456 assign01-q03.java” for the java code files for question #1, question #2 and question #3, respectively. Please noted that the file extension .docx and .java will be automatically assigned by the system, but you need to ensure that they are named and assigned properly and accordingly). Marks deduction applied for those that not complied with the specifications.
- The codes and modules/classes, if exists, for any one particular question must all be placed in one single java coding file unless it is stated otherwise.
- The grading of your works will be based on the assessment components of: appearance & programming styles (20%); internal comments (10%); user interfaces, input & output design (20%); and correctness (50%). The percentage distributions are for your references only, they are subjected to change without notifications ahead of time.
- ALL works submitted by you MUST be your own. Any form of plagiarism is an offense of academic integrity and all students involved will receive a zero (0) marks.
- No late submission of assignments. Late submission for any excuses/reasons will not be entertained and be graded zero.
- Please pay attention to any new announcements and requirements before the due date of the assignment and read all the instructions and requirements and instructions thoroughly.
- Write a java program that repeat for number of students until a specific criteria reached, determine their final scores and their corresponding letter grades according to the followings:
Assessment method:
In-class exercises 10%
Assignments 20%
Mid-term 20%
Exam 50%
Grading method:
90 ~ 100 A
80 ~ 89.9 B
70 ~ 79.9 C
60 ~ 69.9 D
50 ~ 59.9 E
0 ~ 49.9 F
Your program should have the following features and complied with the requirements that specified:
-
- Each input line consists of the student ID, the score of in-class exercises, assignments, mid-term exam, and final exam, with the sequence of a sample input as: (i.e. the “*” will be used as the terminator of the input data)
bx134566 68 85 92 86
bx224245 35 62 88 72
bx384858 88 74 63. 80
*
-
- You are not required to perform the validation of inputs, assumed that they are all in the correct format and style.
- Your program needs should have a main method repeatedly prompt the user to enter the student ID and scores, control and invoke a method that determine the final score, a method that determine the corresponding letter grade and a method display the results in a self-descriptive and user-friendly manner.
- Write a program, TaxCalculator, to build a financial application in Java that will be used for calculating the taxes due for a number of employees, an employee's salary due will be determined according to the Macau incremental tax system as follow:
Your program should have the following features and complied with the requirements that specified:
-
- A TaxCalculator class, which should have a method called calculateTax() that takes a single parameter, the employee's salary, and returns the amount of taxes due.
- A main method that prompts the user to enter the employee's staff number and annual salary until a certain criteria (you can decide this criteria yourself) and prints the amount of taxes due returns from the calculateTax() method in the TaxCalculator class. If the salary entered by the user is negative or zero, the
program should print an error message and prompt the user to enter a valid salary.
-
- Each input line consists of the staff number and the annual salary, with the sequence of a sample input as:
s1345 | 236885.20 |
s2245 | 35628.8 |
s4858 | 688746.80 |
- Write a java program to compare the duration (in milli-seconds) taken by the following sorting methods for a list that contains 100,000 data elements in random order:
- Smart Bubble sort
- Insertion sort
- Selection sort
- Merge sort
- Radix sort
Your application should have the following features and complied with the requirements that specified:
- Your program needs to use a different method (user-defined method) or methods for a different sorting method.
- A method that for creating the random data set contains the 100,000 elements in random order, you may further assume all the data elements are all in the range from 10001~99999.
- A method to display the summary of the durations (in milli-sexonds) among the different sorting methods as (please noticed that, the figures shown is for your references only, your results not necessary be the same as shown):
Sorting Method Complexity
Smart-bubble sort | 20359 |
Insertion sort | 5344 |
Selection sort | 1659 |
Merge sort | 48 |
Radix | 12 |
- You need to perform the necessary testing and show that the outcome from each of the sorting method called really be able to sort the list in ascending order.
- You may use the system method System.currentTimeMills() to get the current time in milli-seconds.
- You may consider to perform the merge sort by recursion.