Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help me write the program with java in the simpliest way pls here is the A1 text Write a program called CourseMarks that reads data

Help me write the program with java in the simpliest way pls image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
here is the A1 text
image text in transcribed
Write a program called CourseMarks that reads data from a file called A1.txt. You can find A1.txt in the content section of Nexus and linked from the class schedule. The file contains a list of students consisting of their name, student number, 11 lab marks, 4 assignment marks and 2 exam marks (midterm and final). Store each of the name, student number and marks in parallel arrays, where each array is related. Use 2D arrays for the lab marks, assignment marks and exam marks (i.e. a 2D array for each student's 11 lab marks, another for 4 assignment marks and a third for the 2 exam marks). Initial data: 40 7 8 10 45 90 Han Vader 50 Assignments Midterm Final Name Student# Labs (each out of 10) (out of 50) (50) (100) Luke 777 86 7 9 10 8 9 8 7 10 0 46 38 42 40 85 Leia 107 7 7 9 9 8 8 8 7 0 34 35 30 28 32 70 Yoda 123 10 10 10 10 10 10 10 10 10 10 50 50 50 50 49 99 666 8 10 9 9 10 7 9 8 9 10 10 50 46 48 44 301 8 6 6 9 9 7 0 7 10 8 8 28 040 30 24 Lando 300 67 7 7 6 8 9 8 7 7 8 40 35 35 42 (come on! You've got to recognize this reference) Individual components of the course are weighted as follows: 10 labs: 10% of final mark (weighted evenly, best 10 of 11) + 4 assignments: 15 % of final mark (weighted evenly) Midterm exam: 25% of final mark Final exam: 50% of final mark When the program runs, display the data summarized in the following format: 8 JL 3 1 As 3 3.2 2.3 Student Luke Leia Yoda Han Vader Lando # 777 107 123 666 301 300 Labs 8.2 7.8 10.0 9.2 7.8 7.4 Asi 3.5 2.6 3.8 3.8 2.1 3.0 As2 2.9 2.6 3.8 3.5 0.0 2.6 3.8 3.6 3.0 2.6 As 4 3.0 2.1 3.8 3.3 2.3 3.2 Mid 20.0 16.0 24.5 22.5 12.0 17.5 Final Mark 42.5 83.2 35.0 68.3 49.5 99.0 45.0 90.8 25.0 52.2 36.0 72.3 Note that the Labs column contains the overall lab mark the student received out of 10 (the lowest mark is dropped). The assignments and exams are displayed with their respective weighting, and the total overall mark is displayed. The user will then be given an option to change a student's mark. The system prompts the user for the lab/assignment/exam to change, and the student number and new mark. The system confirms the change and displays the summary again. Include methods calculateWeightedMarks, displaySummary, and changeStudentMark. + Notes: Use the size of the sample data for initializing array lengths - to format a double to 1 decimal place, use String.format("$.18", value) ArrayLists should not be used, but you may use other utilities from the Java Class Libr Don't use break except in switch statements Use auxiliary arrays as needed Sample output (text in blue is user input): ---Final Marks--- Student # Labs Luke 777 8.2 Leia 107 7.8 Yoda 123 10.0 Han 666 9.2 Vader 301 7.8 Lando 300 7.4 Asi 3.5 2.6 3.8 3.8 2.1 3.0 As 2 2.9 2.6 3.8 3.5 0.0 2.6 As 3 3.2 2.3 3.8 3.6 3.0 2.6 As 4 3.0 2.1 3.8 3.3 2.3 3.2 Mid 20.0 16.0 24.5 22.5 12.0 17.5 Final Mark 42.5 83.2 35.0 68.3 49.5 99.0 45.0 90.8 25.0 52.2 36.0 72.3 Options: A. Change a student grade B. Quit > A Enter the student number: > 301 Select: A. Lab B. Assignment C. Exam > B Enter the Assignment number followed by the new mark: > 2 40 The mark has been updated. ---Final Marks--- Student # Labs Luke 777 8.2 Leia 107 7.8 Yoda 123 10.0 Han 666 9.2 Vader 301 7.8 Lando 300 Asi 3.5 2.6 3.8 3.8 2.1 As2 2.9 2.6 3.8 3.5 3.0 2.6 As3 3.2 2.3 3.8 3.6 3.0 2.6 As 4 3.0 2.1 3.8 3.3 2.3 3.2 Mid 20.0 16.0 24.5 22.5 12.0 17.5 Final Mark 42.5 83.2 35.0 68.3 49.5 99.0 45.0 90.8 25.0 55.2 36.0 72.3 7.4 3.0 Options: A. Change a student grade B. Quit > B *** End of program *** A1 - Notepad File Edit Format View Help Luke 777 8 6 7 9 10 8 9 8 7 10 0 46 38 42 40 40 85 Leia 107 7 7 7 9 9 8 8 8 78 0 34 35 30 28 32 70 Yoda 123 10 10 10 10 10 10 10 10 10 10 10 50 50 50 50 49 99 Han 666 8 10 9 9 10 7 9 8 9 10 10 50 46 48 44 45 90 Vader 301 8 6 6 9 9 7 0 7 10 8 8 28 0 40 30 24 50 Lando 300 677 768 9 8 7 7 8 40 35 35 42 35 72

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic 4 Ole Database And Controls Superbible

Authors: Michael Hatmaker, C. Woody Butler, Ibrahim Malluf, Bill Potter

1st Edition

1571690077, 978-1571690074

More Books

Students also viewed these Databases questions