Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Visual Studio Project using C# Lab 4 (cont.) For this program, you ill have a class - GRADENAME. This Class contains two elements, a NAME

image text in transcribed

Visual Studio Project using C# Lab 4 (cont.) For this program, you ill have a class - GRADENAME. This Class contains two elements, a NAME and a GRADE and will be an array. Use the method of the class to let the user enter the names and grades for a group of students. Your program will call the method DISPL_NAME_GRADE which will display the names and grades. Following the names and grades being displayed, the method SORT_NAME GRADE will sort the names and grades into name sequence. The method DISPL_NAME_GRADE will be called after the sort process to display the arrays in the new sequence Processing Main Method Use Class GRADENAME array In a loop Prompt the user for name and grade by calling class function for input name and grade Add a Name and Grade to class array Eadloop Clear the screen Call DISPL_NAME GRADE (pass ClasS GRADENAME array) Call SORT_NAME_GRADE (pass ClasS GRADENAME array) Call DISPL_NAME_GRADE (pass Class GRADENAME array) Data Name Lucas, Carol Wright, Ben Flowers, Lisa Grossman, Steve Higgins, Larry Bookman, Carla Grade End of program C Class GRADENAME Name Grade Method: DISPL NAME GRADE display names and grades Class GRADENAME, which is an array, will be passed. Processing. Methods Prompt the user for name and grade Return Name Return Grade Display headings for the report In a loop getName) Display NAME and GRADE from GRADENAME getGradel End Loop The method will not return any values Method SORT NAME_GRADE - sorts NAME and GRADE by NAME Class GRADENAME, which is an array, will be passed. Processing: Bubble Sort In a loop from the first name to second to last In a second loop from counter in outer loop +1 to last Compare the two names (If- Sting.Camnateo > 0) Switch members of array if first item> second Switch Names and Grades End Loop End Loop The method will not return any values

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

Graph Database Modeling With Neo4j

Authors: Ajit Singh

2nd Edition

B0BDWT2XLR, 979-8351798783

More Books

Students also viewed these Databases questions