Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit


CSCI 1110 – Winter 2022

Assignment 0


The purpose of this assignment is to allow you to self-assess your readiness for this course. If you are struggling to complete this assignment and have not taken CSCI 1100 or CSCI 1105, please consider taking CSCI 1105 before this course. This assignment may be done in any programming language.

For this problem, you will be provided with sample inputs and corresponding outputs. All input is done via the console (unless specified otherwise), and all output is to be done to the console as well. If you are submitting your assignment via Mimir, you can test it by clicking the Run Tests button.

If you are using a language not supported by Mimir (Java and Python), a zip file containing the test inputs and outputs is provided for testing your program.

Please note that unlike the rest of the assignments in this course, this assignment is strictly graded based on functionality. This ensures that you receive the appropriate feedback to decide if CSCI 1110 is the right course for you.

To complete this assignment, you will need to know about:

•     Data types

•     Variables

•     Arithmetic

•     Input and Output

•     Methods (helper functions)

•     1D or 2D Arrays


Problem 1 – The Final Score

In this assignment, you will write a program that will calculate your final marks in this course to CSCI 1110. We will calculate the final score in this first problem given all your marks (i.e. at the end of the course). Each problem will build upon the previous solution.

Based on the syllabus, write a formula that will calculate the student's final score in the class. For          simplicity, assume the scores for assignments, practicum, tests, labs, and exams are pre-averaged and therefore are a single data point each.

Input

•     Student name (String)

•     Banner number (String)

•     Marks on each assessment (int) in order of Tests, PoD, Assignments, Practicum, Labs

Output

•     Pretty printed report as exemplified below

•     The final score should be printed with two decimals points (double)

Example:

Input

Output

Anon Ymous

B00900900

80

90

70

40

50

Hi Anon Ymous (B00900900), based on the input given:  Tests= 80% PoDs= 90%, Assignments= 70%,               Practicums=40%, Labs=50%, your final score is 65.85%.

 


Problem 2 – Computing Medians

Modify your program to use a method (helper functions) to calculate the median score. The method        should receive an array (or list) of the grades. If you don't use arrays (or lists) you will receive a zero on this problem.

The median is defined as "a value in an ordered set of values below and above which there is an equal number of values or which is the arithmetic mean of the two middle values if there is no one middle

number." The wiki has more info on it:https://en.wikipedia.org/wiki/Median

Your method will receive the array (or list) create a copy of it and then sort it so you can compute the median. If you are on Java, you can use the Arrays class to help you with these operations.

Input

•     Student name (String)

•     Banner number (String)

•     Marks on each assignment (int) in order of Tests, PoD, Assignments, Practicum, Labs

Output

•     Pretty printed report as exemplified below

•     The final score should be printed with two decimals points (double)

•     Median (int)

Example:

Input

Output

Anon Ymous

B00900900

80

90

70

40

50

Hi Anon Ymous (B00900900), based on the input given: Tests= 80% PoDs= 90%, Assignments= 70%,              Practicums=40%, Labs=50%, your final score is 65.85% with a median of 70%.


Problem 3 - Predictions

Modify your program to calculate the highest possible score, mean and median, (i.e. the score possible if the student were to get 100% on all marking schemes hereafter) given user input of current scores.

•     For full marks, the solution will need to calculate the average of N numbers. The user will  first input an int specifying how many numbers they will be entering for the computation.

o For example, if the user wants to enter only the Tests and PoDs scores, they will     need to specify '2'. You will then assume all other (assignments, practicums, pods) scores are 100

•     The order of entry remains Tests, PoD, Assignments, Practicum, Labs. So, the program is limited to accepting items in that order.

•     Bonus Objective (not for marks), after completing this question modify your code to better serve you and your progress in the course (e.g. accepting more information, different          ordering, flexibility of input).

Input

•     Student name (String)

•     Banner number (String)

•     Number of learning objectives completed (int)

•     Marks on each assessment (int) in order of Tests, PoD, Assignments, Practicum, Labs

Output

•     Pretty printed report as exemplified below

•     The final score should be printed with two decimals points (double)

•     Median (int)

Example:

Input

Output

Anon Ymous

B00900900

5

80

90

70

40

50

Hi Anon Ymous (B00900900), based on the input given for 5/5 scores: Tests= 80% PoDs= 90%, Assignments=  70%, Practicums=40%, Labs=50%, your final score is  65.85% with a median of 70%.

Anon Ymous

00900900

1

80

Hi Anon Ymous (00900900), based on the input given    for 1/5 scores: Tests= 80% PoDs= 100%, Assignments=   100%, Practicums=100%, Labs=100%, your final score is 94.90% with a median of 100%.

Anon Ymous

00900900

2

80

90

Hi Anon Ymous (00900900), based on the input given    for 2/5 scores: Tests= 80% PoDs= 90%, Assignments=    100%, Practicums=100%, Labs=100%, your final score is 93.90% with a median of 100%.