Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please help me out to complete the required task in visual studio. For the first

ID: 3600314 • Letter: P

Question

Please help me out to complete the required task in visual studio. For the first step please use the homework 3 specification at the bottom of this question. tHanks.

Please run your programme

# 4 – Library Application with Music and Video

please use c++ programming language. and please start from the scratch...


Due Wednesday, October 25, at the beginning of class. Hand in hard copy of your code and be
prepared to run your program. Develop your program as follows:
• Complete part 1 before you begin part 2.
• The main program and each class definition must be in separate files.
• Hard code test data in the program. Do not enter test data when you run the program.
• Use functions to break your main program into components
• Add a comment at the beginning of all classes and functions to describe behavior.
Part 1 – Publication Class
In your solution to homework 3, rename Book to Publication wherever it appears. Test your
program to ensure it works properly.
Part 2 – Book, Music, and Video classes
Add a new Book class, as well as Music and Video classes. All three classes are derived from the
Publication class. Add these member variables:
Book class:
• pages
• format (hardcover, softcover, digital)
Music class:
• duration (seconds)
• format (MP3, AAV, WAV)
Video class:
• resolution (low, high, 4K)
• producer
All three classes should have constructors, get, and set functions.
Extend your main program to edit and display Publication and Person data, using this menu:
1) Display people
2) Display publications
3) Edit people
4) Edit publications
5) Check out publication
6) Check in publication
7) Quit

=====================================================================

=======================

Publication class could be used from this data.

Homework 3 – Library Application
Due Monday, October 16, at the beginning of class. Hand in hard copy of your code and be
prepared to run your program. Develop your program as follows:
• Code and debug part 1 before you begin part 2.
• The main program and each class definition must be in separate files.
• Hard code your test data in the program, so that you do not have to enter data when
you run the program.

Part 1 – Person class
Write a Person class that tracks subscribers to a library, with these member attributes:
• full name
• identifier (numeric)
• email address
Person has these member functions:
• Constructor - initializes new object
• get and set function for each attribute
Write a main program with these capabilities:
• Create test data for four people
• Display all people
• Edit attributes of an existing Person

Part 2 - Book Class
Write a Book class that tracks all books in a library, with these member attributes:
• title
• author
• status - indicates if Book is checked out
• borrower – the Person object that has currently checked out book, if any
Book has these member functions:
• Constructor - initializes new object
• get and set function for borrower member variable
• checkOut - enables Person to check out Book - do not allow if book is checked out
• checkIn - enables Person to check in Book

Homework 3 Page 2
Extend your main program of part 1 with these capabilities:
• Create test data for six books
• display all books in library, along with name of borrower (if any)
• enable people to check books in and out

Explanation / Answer

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Programs { public class Student { public string First { get; set; } public string Last { get; set; } public int ID { get; set; } public List Marks; public ContactInfo GetContactInfo(Programs pg, int id) { ContactInfo allinfo = (from ci in pg.contactList where ci.ID == id select ci) .FirstOrDefault(); return allinfo; } public override string ToString() { return First + "" + Last + " : " + ID; } } public class ContactInfo { public int ID { get; set; } public string Email { get; set; } public string Phone { get; set; } public override string ToString() { return Email + "," + Phone; } } public class ScoreInfo { public double Average { get; set; } public int ID { get; set; } } List students = new List() { new Student {First="Tom", Last=".S", ID=1, Marks= new List() {97, 92, 81, 60}}, new Student {First="Jerry", Last=".M", ID=2, Marks= new List() {75, 84, 91, 39}}, new Student {First="Bob", Last=".P", ID=3, Marks= new List() {88, 94, 65, 91}}, new Student {First="Mark", Last=".G", ID=4, Marks= new List() {97, 89, 85, 82}}, }; List contactList = new List() { new ContactInfo {ID=111, Email="Tom@abc.com", Phone="9328298765"}, new ContactInfo {ID=112, Email="Jerry123@aaa.com", Phone="9876543201"}, new ContactInfo {ID=113, Email="Bobstar@aaa.com", Phone="9087467653"}, new ContactInfo {ID=114, Email="Markantony@qqq.com", Phone="9870098761"} }; static void Main(string[] args) { Programs pg = new Programs(); IEnumerable studentQuery1 = from student in pg.students where student.ID > 1 select student; Console.WriteLine("Query : Select range_variable"); Console.WriteLine("Name : ID"); foreach (Student s in studentQuery1) { Console.WriteLine(s.ToString()); } Console.ReadLine(); } }