Develop maintainable and reusable solutions

Assignment Help JAVA Programming
Reference no: EM132532394

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: EM132532394

Questions Cloud

Electronic communication and transaction act : What provisions in the Electronic Communication and Transaction Act give rise to the service provider regime?
What this means is that you can have lot of pollution : Pollution is usually measured as the amount of pollution per person. What this means is that you can have a lot of pollution,
How can a service provider prove : How can a service provider prove that he has a rights in respect of an already registered domain name?
How much of this dividend will be distributed : On December 15, 2015, Corgi declares dividends of $210,000. How much of this dividend will be distributed to Common Stock
Develop maintainable and reusable solutions : Develop maintainable and reusable solutions using the object oriented paradigm. MySchool is a Java application for schools. It reads data from files
Discuss the logic of the manova : Discuss the logic of the MANOVA. Why would a researcher use MANOVA instead of running several separate analyses of variance? Mention specific advantages.
What are the requirements that a database : What are the requirements that a database must meet in order to enjoy copyright protection?
Take look at ethics around you : Search online for your local news website and locate local a story where you believe an ethical dilemma is going on.
Cyber-squatting and trademark infringement : What is the difference between cyber-squatting and trademark infringement?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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