Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a java program that: 1. Create a file with the name StdMark.txt and has the following content (the student name and his three courses

image text in transcribed
Write a java program that: 1. Create a file with the name "StdMark.txt" and has the following content (the student name and his three courses mark) with the same structure: Asmaa Alali 80 90 89 Somaiah Mandorah 77 75 65 Mariyam Aleliyan 98 90 99 Raniyah Saad 55 60 58 Kareemah Mohsen 60 64 68 2. Read the file "Std Mark.txt" content one by one and calculate the average of the three courses mark and decide his grad (A, B, C, D or F), then write the result in a new file with the name "stdGrade.txt". The new file content should have the following structure: Asmaa Alali B Somaiah Mandorah C Mariyam Aleliyan A Raniyah Saad F Kareemah Mohsen D Read a name from the user and search the file "StdGrade.txt", then print the student grade if the student name exists, other wise display a message "student name not found". Note: in order to calculate the average, you will have to use Integer.parseInt( ) to transform string to integer Hints: . read string from file using nextline(); transform string to string array e.g. Asmaa Alali 80 90 89 ====> array content [Asmaa, Alali, 80, 90,89] . . call parsint to convert string into integer numbers e.g. int num1= Integer.parseInt( array[2])

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

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

More Books

Students also viewed these Databases questions