Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q1: Use Visual Studio editor to write a console program in C# to display complete student information. Create a struct Person with members for the

image text in transcribed
Q1: Use Visual Studio editor to write a console program in C\# to display complete student information. Create a struct Person with members for the first name, last name and age. Create another struct Student with members: Person, student ID, college name, city, and address. (Check the solution of Lab 3.3) Create minimum two objects for representing two students from the same college, one is hard-codded and the second is entered by the user on run time. Accept (validate) student's and college values into the appropriate struct variable's datatypes (use Convert class). Add the try \& catch to all your conversions from string to some other datatypes (use goto instruction if you have an exception). Store all those values into an object, and then, save it into an array. Create a menu with 7 options and the switch with 7 cases and default. Have the option 1 that allow you to add the student instance into an array of 5 (up to 5 ). Create a list of the same type as the array (Student) with those instances of the array. Have the option 2 that allow you to add the student instance into the list (use the method Add() ). Create option 3 to display all the student's information from the array (use for loop). Display student data on 3 lines, using the interpolation (align all the numbers to the left using 10 spaces and the text to the left using 15 spaces). Add a dashed line (.....) at the end of the display. Create option 4 to display all the student's information from the list (use for loop). Display student data on 4 lines, using the placeholders (align all the numbers to the right using 8 spaces and the text to the right using 10 spaces). Add a double dashed line (=m=m=m) at the end of the display. Create option 5 to add the students of the array to the list (use the method Clear()). Create option 6 to remove all students from the list (use the method AddRange()). Create option 7 to quit the program, with confirmation from the user

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

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

Describe the concept of diversity and diversity management.

Answered: 1 week ago