Devise suitable algorithmic solutions

Assignment Help JAVA Programming
Reference no: EM132536968

COSC2531 Programming Fundamentals - RMIT University

LO1. Analyse simple computing problems.
LO2. Devise suitable algorithmic solutions and code these algorithmic solutions in JAVA.
LO3. Develop maintainable and reusable solutions using the object oriented paradigm. MySchool is a Java application for schools. It reads data from files. IMPORTANT: you should change data in these files to verify your program. We will use different files during marking.

Part 1: PASS Level

At this level, your program can read from a file specified in command line and store student scores in a 2D integer array. You may define methods wherever appropriate to support the functionalities.

scores.txt

 

34

C081

C082

C083

C084

S2023

99

75

85

62

S2025

-1

92

67

52

S1909

100

83

45

-1

The file stores data as a text table shown above. Data fields are separated by spaces and new lines. The first row contains course IDs and the first column contains student IDs. The first field in the data, the top left corner, shows the number of rows and the number of columns in one integer. For example ‘34', the first digit 3 means there are 3 students in this table. The second digit 4 means there are 4 courses. You can assume that the total number of courses will never be more than 9.

The table stores every student's final results in those courses. Results are all integers. A result ‘-1' means not enrolled in that course. A ‘0' means the student did enrol but failed to receive any mark. Your program can find the student with the highest average score and display on the command line:
> java MySchool scores.txt
> The top student is S2023 with an average 80

Part 2: CREDIT Level --- You must ONLY attempt this level after you complete the PASS level

Your program can read one more file which stores the information of courses offered by the school. Info includes course ID, course title and credit points. You can assume all courses of the school appear in this file and in the first file (student results file). There is no duplicate or redundant courses.

courses.txt

 

C081

Mathematics

12

C082

Science

12

C083

English

24

C084

Technologies

6

At this level your program can produce a text file named as course_report.txt.

> java MySchool scores.txt courses.txt
> The top student is S2023 with an average 80
> courses_report.txt generated!
Given the above courses.txt, course_report.txt should look like below. The fourth column is the number of enrolled students. The fifth column is the average score of each course.

C081 Mathematics 12 2 99
C082 Science 12 3 83
C083 English 24 3 65
C084 Technologies 6 2 57

Part 3: DI Level --- You must ONLY attempt this level after you complete the CREDIT level

A this level, your program can read one more file from command line. That file stores information about students, that includes student ID, name (no space between first name and last name, but an underscore) and age. You can assume all students appear in this file as well as in the first file (student results file). There is no duplicate records or empty records.

students.txt
S2023 Sue_Vaneer 14
S2025 Robin_Smith 13
S1909 Barry_Banks 15

At this level your program can produce a text file report named as student_report.txt.

> java MySchool scores.txt courses.txt students.txt
> The top student is S2023 with an average 80
> course_report.txt generated!
> student_report.txt generated!

Given the above students.txt, student_report.txt should look like below. The fourth column is the number of courses that student enrolled im. The fifth column is the average GPA. A course result of 80+ receives 4 GPA points. A result of 70-79 receives 3 points. A result in between 60-69 is 2 points. 50-59 gets 1 points. Under 50 has 0 points. For example Sue Vaneer has 2 HD, 1
DI and 1 CR. So her GPA is ( 4 x 2 + 3 + 2 ) / 4 = 3.25.

S2023 Sue_Vaneer 14 4 3.25
S2025 Robin_Smith 13 3 2.33
S1909 Barry_Banks 15 3 2.66

At this level, your program can handle some variations in the files.
(1) characters in sources.txt will be treated as -1.
(2) decimal numbers will be treated as integers, ignoring the decimal part, e.g 99.5 -> 99
(3) The order of lines in both students.txt and courses.txt does not matter. (You can assume that the order of columns does not change.)

 

34

C081

C082

C083

C084

S1909

Barry_Banks

15

S2023

99.5

75

85

62

S2025

Robin_Smith

13

S2025

x

92

67

52

S2023

Sue_Vaneer

14

S1909

100

83.2

45

abc

 

 

 

Part 4: HD Level --- You must ONLY attempt this level after you complete the DI level
A this level, your program achieves the above requirements in OO style with at least three classes, School, Student and Course. Design the appropriate instance variables, constructor(s) and methods for these classes. Class related info should be encapsulated inside of these classes.

In addition, student_report.txt generated at this level is more advanced, taking credit points of each course into consideration. See below. The fourth column is now the total credit points that the student has completed. For example Sue Vaneer, she has done all four courses, so she earned 12 + 12 + 24 + 6 = 54 credit points. The fifth column is the adjusted GPA. So that for Sue is (4 x 12 + 3 x 12 + 4 x 24 + 2 x 6 ) / 54 = 3.55, which is more accurate than that in the DI level.

 

S2023

Sue_Vaneer

14

54

3.55

S2025

Robin_Smith

13

42

2.42

S1909

Barry_Banks

15

48

2.0

Part 5: Miscellaneous

To verify the calculations, you can import the files, especial the provided test files, into a spreadsheet tool, e.g. Excel, Google Spreadsheet, Numbers, which can easily compute average, max etc.

You program may have no interaction with users during execution. Simply run the code, read the files, display output and/or generate file(s).

You can assume user always type file names in the right order in command line, e.g. score file first, then course file, then student file. However it is possible that file is missing or cannot be found.

Your program should quite gracefully in these circumstances.

Attachment:- Programming Fundamentals.rar

Reference no: EM132536968

Questions Cloud

Describe the stages of reflective judgment theories : Integrate the possible selves and stages of reflective judgment theories in the text. Discuss ethical and cultural strategies for promoting resilience.
What is total paid-in capital at the end : The firm was authorized to issue 81,000 shares of $5 par common stock. What is total paid-in capital at the end of 2021
Prepare a fixed budget income statement for planned level : Prepare a fixed budget income statement for the planned level of sales and production and for the actual level of sales and production
What were net cash flows from operating activities : Investing and financing activities created positive cash flow totaling $900 million. What were net cash flows from operating activities
Devise suitable algorithmic solutions : Develop maintainable and reusable solutions using the object oriented paradigm and Analyse simple computing problems - code these algorithmic solutions in JAVA
What is amount of net cash provided by operating activities : Freeman Company's accounting records include the following information: Payments to suppliers $50,000. What is amount of net cash provided
Find the total amount of cash expected to be received : Cash sales are normally 25% of total sales,Find The total amount of cash expected to be received from customers in September is?
Identify one current social issue or event : Identify one current social issue or event (e.g., diversity in the workplace, technology, outsourcing) and discuss how this issue or event affects industrial.
How various pay systems create different level of motivation : The assignment asks you to tell us two things about each I/O pioneer: what you see as their major contribution, and how that helps us today. You may need.

Reviews

Write a Review

JAVA Programming Questions & Answers

  What would be an incorrect way of writing this equation

Jim develops 5 Java applications a year. Joe develops 10 Java applications a year. Jim gets paid $5000.00 per application, but Joe gets paid $10000.00 per application.

  A regular polygon is an n-sided polygon

A regular polygon is an n-sided polygon in which all sides are of the same length and all angles have the same degree(i.e the polygon is both equilateral and equiangular).

  Implement an internet resource retriever to act as a client

For this assignment, you must implement an Internet resource retriever to act as a client and to make requests to a server.

  Create bean jsp program which will compute simple interest

Create the bean which will compute Simple Interest. Use bean in JSP program. Accept details of saving like principal amount, rate of interest, period-in years from user and show amount

  Explain encapsulation and the benefits of encapsulation

Explain encapsulation - the benefits of encapsulation and why breaking encapsulation is considered a violation of the "prime directive" of OOP.

  Build a class named roulette

CS 1400 - Hilton - Build a class named Roulette with a method named betOnce that takes a console Scanner and an integer as parameters

  Describe solution to each problem

If we ask the wolf to calculate its path twice it works, but not if we ask it to do so only once - If your solution does already work for a larger game

  Create a project and add to it a class monthlyrecord

Create a project and add to it a class MonthlyRecord. Give this class an instance variable for the name of the month and an array of doubles

  Programming using the java language

Programming using the Java language. The basic concepts of object-oriented programming. Topics used will include algorithmic logic, control structures, data and program design, objects and classes.

  Calculate and notify violators of the fines

Java program that can be used to calculate and notify violators of the fines and/consequences for road traffic breaches

  Simulate a simple multiuser computer system

Prepare a java program to simulate a simple multiuser computer system

  Create a program that has an array of given length

Create a program that has an array of length 100 which will automatically be filled with randomly generated numbers between 1-100 each time the program is run

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd