Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java help for this assignment you will create multiple students, give them names and ID numbers, and print them out at the end of the

Java help

for this assignment you will create multiple students, give them names and ID numbers, and print them out at the end of the program.

Instructions

For this assignment, you will:

  • Create an array of size 10 in main called arrayOfStudents (or similar).
  • Create a while loop in your Main class. Have it quit when the user enters 'n'
  • Create a custom "Student" class.
  • Add two instance variables to Student: name and ID (both are Strings).
    • Make both instance variables private.
  • Create Set and Get functions for name and ID in Student.java

For each iteration of the loop in main:

  • Ask the user if they wish to quit and print. If the user types in n, it finishes. If the user types anything else, the loop continues and does the following:
    • Create a student variable
    • Prompt the user to enter a name for a new student.
    • Read in a string from the user for name. Set the student's name.
    • Prompt the user to enter an ID for a new student.
    • Read in the string for the student ID. Set the student's ID.
    • Add student to array.

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

Fundamentals Of Database System

Authors: Elmasri Ramez And Navathe Shamkant

7th Edition

978-9332582705

More Books

Students also viewed these Databases questions