Create the classes phonebook school and student

Assignment Help DOT NET Programming
Reference no: EM131390668

Project

School/Student Phonebook

Your task is to create the classes School, Student and Phonebook, such that the following Main( ) function should compile and execute correctly:

Implementation hints:

• Create the classes Phonebook, School and Student. You will need to write a constructor for School that accepts a single string which is the name of the school.

• Create properties for the class School. The class School needs only one property which stores the name of the school (of type string). It also needs a class member variable which stores a collection of students. The best way to do that is to use a class similar to C++'s std::vector, called List<>. It can be found in the namespace System.Collections.Generic, so you will need to add a using statement at the top of the School.cs file. Then, you should initialize this variable in the class constructor:

Students = new List<Student>( );

• Similarly you have to add one class member variable (property of the List<School>)to the class PhoneBook which stores a collection of schools. You could use the same method as for studens for this property.

• Add a function to the class School called AddStudent. It should accept a single parameter of type Student. It should simply store the student instance in the List<Student> member variable (use the Add( ) function which works similarly to the push_back( ) function in std::vector).

• Add properties to the class Student. You will need two properties: SSN, Name and Age. I'll leave it to you to figure out the type of these properties.

• Override the ToString functions in both classes (see the book for details). The Student version of ToString is quite simple, while the School implementation will need the following:

o A local string variable that will contain the end result. You can then use the += operator to concatenate to this variable, and use System.Environment.NewLine; to add a newline to the string. Example:

string result = "Some string" + System.Environment.NewLine; result += "some other string";

o A loop that walks through all students in the collection (also, see the book about foreach statements), and adds each student to the string. Note: you can either call the ToString method for each student explicitly, or use a syntax similar to the one seen inside Main above, where the School instance is printed out explicitly.

• You will new to added the following functions to the PhoneBook class in order to comply with the main program given:

o AddNewSchool:

- Ask user for name. Create new school and add to PhoneBook schools.

o AddNewStudentToSchool:

- For this part you will have to figure out how to ask the user for which school to add the student to. One solution could be to ask the user for the index of the school and then ask user for ssn, name and age, and add the student to chosen school.

o EditStudentInSchool:

- Very similar for when adding new students to schools, you will have to figure out how to ask the user for which school to look for the student in as well as how to ask the user for which student to edit. Both could be solved by asking the user for index of school and then index of student in the corresponding list. Then just ask user for update ssn, name and age, and update the chosen student.

o Override the ToString:

- Simililar to the School class, you could have a loop that walks through all school in the phonebook and call the ToString method for each school explicitly. The printout example above should give you a good idea this should look like

o Html:

- This function should be very similar to sample printout, e.i. it should return a string containing the printout for the entire phonebook. The only difference being that output should be valid HTML.

- This could be an example for the HTML function:

public string Html()
{
StringBuilder result = new StringBuilder();
//...
result.Append(" append html some content ");
//...
//Create and save file a project root
using (StreamWriter writer = new StreamWriter("result.html"))
{
writer.WriteLine(result);
}
//return HTML
return result.ToString();
}

- You will also need to implement the following requirements:

• Make sure to have a single table in the body of the document
• <html>, <head>, <title>, and <body> are mandatory
• all tags must be properly nested
• all tags are in lowercase (<h1> instead of <H1>)
• all tags are properly closed, and empty elements have a trailing slash
• (<strong></strong>, and <img src="..." />)
• all attribute values are properly quoted (<img alt="Hello" /> instead of <img alt=Hello />)
• all attribute names must be in lower case

Hand in

The deadline for this assignment can be seen on myschool. Hand in a single .zip/.rar/.7z file containing the .cs files plus the .exe file:

• School.cs
• Student.cs
• PhoneBook.cs
• Program.cs
• PhoneBookApp.exe

Please note that this is an individual assignment.

Attachment:- Project.pdf

Reference no: EM131390668

Questions Cloud

Produce proteins for exportation : What are some examples of human cells that produce proteins for exportation?
Which controls cellular function : Which molecule contains the genetic information that is transmitted hereditarily and which controls cellular function?
Discuss about the kohlbrergs model of moral development : compare and contract Kohlbrerg's model of moral development to Carol Gilligan's care ethic.How do they complement each other according to Applied Professional Ethic?what different bwt the idea of intention and the motive according to Applied profes..
Explain whether discount is correct in given contention : Discount refuses, and A, B, and C refuse to sell to Discount. Discount contends that A, B, and C are in violation of antitrust law. Explain whether Discount is correct.
Create the classes phonebook school and student : Create the classes Phonebook, School and Student. You will need to write a constructor for School that accepts a single string which is the name of the school.
Define the security strategies of defense in depth : In this paper, you will define the security strategies of Defense in Depth and Layered Security along with comparing and contrasting the strategies by explaining
Would your answer differ if z reduced its price : Z sells cameras to A, B, C, and D for $160 per camera. Y, one of Z's competitors, sells a comparable camera to A for $148.50.- Would your answer differ if Z reduced its price to A to $140?
Advise giant as to the validity of its alternatives : Giant is presently seeking to obtain an exclusive dealing arrangement with Universal or to acquire Universal. Advise Giant as to the validity of its alternatives.
Discuss the validity of the given : Discuss the validity of the given:- An agreement between manufacturer and distributor not to sell a dealer a particular product or parts necessary for the product's repair.

Reviews

Write a Review

DOT NET Programming Questions & Answers

  Develop web services based application

Develop and test a Web services based application that meets the requirements applying SOA design principles.

  Design style elements in asp

Add drop down lists for modifying the different style elements for the label element that displays the time

  Create a shopping cart in asp

The users will use a browser to access the on-line store. The web server software for the production web server is Windows 2003 Server /IIS6.

  Inventory management system in c# application

Inventory management system in c# application

  Using .net resources to teach .net

This project will use the .NET framework to produce a set of materials to demonstrate the fundamental principles of .NET. Ideally it should demonstrate some of the principles of the framework e.g. interoperability.

  Prepare a marymount faculty site

Prepare a Marymount faculty site

  Blinky lights

Analysis proving that your code blinks the LEDs at the specified rates.

  Prepare a web application

Prepare a web application that will be used to keep track of patients registering in a hospital.

  Implementing the insurance management system

Implementing the Insurance Management System and implementation of Components as Web Services.

  Describe the characteristics of visual studio 2005

Describe the characteristics of Visual Studio 2005 Visual Studio.Net is a suite of products that includes 4 main languages. Name these languages and outline their use in industries

  What is a connectionstring

What is a ConnectionString. Give a suitable example to illustrate the various part of a ConnectionString

  Prepare a web application for internet service provider

Prepare a Web application and write the code also event planning document base. This web application allows the user to sign up for an Internet service provider for home connectivity.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd