Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that determines how many terms 10 students need to graduate. * Define a two-dimension array with 10 rows and 2 columns. *

Write a program that determines how many terms 10 students need to graduate.

* Define a two-dimension array with 10 rows and 2 columns.

* Prompt the user to enter the number of courses they have left to graduate (value must be between 1 and 20) and how many courses they plan to take each term (value must be between 1 and 5). If the user enters either value out of range then the user must be prompted to reenter.

* The program must store the number of courses a student has left and how many courses they plan to take each term in a different row of the array, i.e. the first student’s number of courses and how many they plan to take each term will be stored in first row of array. The second student’s info will be in second row, and so on.

* The program must compute the number of terms a student has remaining, and this should be an integer.   For example, if a student has 15 courses remaining and plans to take 2 a term then they need 8 terms to complete the courses. In other words, you can have 7.5 terms because the student must attend an entire term.

The picture below is what the output must look like.

<terminated> C8 Project (1) [Java Application] C\Program FilesJavajre1.8.0 131\binjavaw.exe (Mar 26, 2019, 12:55:57 PM) Enter 

C8_Project (1) [Java Application] C:\Program Files\Javaljre1.8.0_131\bin\javaw.exe (Mar 26, 2019, 12:55:57 PM) Enter classes remaining and taking each term for student 1: 8 2 Enter classes remaining and taking each term for student 2: 15 3 Enter classes remaining and taking each term for student 3: 6 1 Enter classes remaining and taking each term for student 4: 12 6 The number of classes per term for student 4 is not valid! Enter classes remaining and taking each term for student 4: 12 5 Enter classes remaining and taking each term for student 5: 13 2 Enter classes remaining and taking each term for student 6: 7 3 Enter classes remaining and taking each term for student 7: 9 4 Enter classes remaining and taking each term for student 8: 3 2 Enter classes remaining and taking each term for student 9: 5 4 Enter classes remaining MD taking each term for student 10: 18 3 Student 1 needs 4 tes to graduate Student 2 needs 5 terms to graduate Student 3 needs 6 terms to graduate Student 4 needs 3 terms to graduate Student 5 needs 7 terms to graduate Student 6 needs 3 terms to graduate Student 7 needs 3 terms to graduate Student 8 needs 2 terms to graduate Student 9 needs 2 terms to graduate Student 10 needs 6 terms to graduate

Step by Step Solution

3.45 Rating (158 Votes )

There are 3 Steps involved in it

Step: 1

Code below import javautilScanner public class StudentCredit p... 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_2

Step: 3

blur-text-image_3

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

Microsoft Visual C# An Introduction to Object-Oriented Programming

Authors: Joyce Farrell

7th edition

978-1337102100

More Books

Students also viewed these Operating System questions

Question

Why is it so difficult to assess whether a firm is properly valued?

Answered: 1 week ago