Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Visual Studio with the C# Language. Suppose you want to design an application to save record of your private collection of music CDs. The

Using Visual Studio with the C# Language. Suppose you want to design an application to save record of your private collection of music CDs. The application allows a collection of CDs. We have the CD classes, CDCollection and Main. Implement the CD and CDCollection classes

image text in transcribed

Fill in the missing code for the CD and CDCollection classes. //*************************************************************** // Coleccion de CDs. //*************************************************************** using System; namespace NameSurname { public class CDCollection { private CD[] collection; private int count; private double totalCost; public CDCollection() { collection = new CD[100]; count = 0; totalCost = 0.0; } // Add a CD to the collection public void AddCd(string title, string artist, double cost, int tracks) { // Complete } // Show the complete collection of CDs on the console public override string ToString() { // Complete } // CREATE A METHOD TO DISPLAY AN ARTIST'S COLLECTION ENTERING HIS NAME } } //*************************************************************** // Class Represents a CD //*************************************************************** using System; namespace NameSurname { public class CD { private string title, artist; private double cost; private int tracks; public CD(string title, string artist, double cost, int tracks) { // Complete } // Get/Set public string Cantante { get => artist; // defines access to artist name. set => artist = value; //modifies the value of the artist. } public override string ToString() { string description; string costStr = string.Format("{0:C}", cost); description = costStr + "\t" + tracks + "\t"; description += title + "\t" + artist; return description; } } } // Main namespace Music { class Music { public static void Main(string[] args) { // Complete Console.In.ReadLine(); } } }

CD -title: string -artist: string - cost: double - tracks: int + CD(title:string, artist: string, cost: double, tracks: int) + Mtodos Get/Set + ToString(): string CDCollection - collection: CDI - count: int - totalCost: double + CDCollection() + AddCd(title: string, artist: string, cost: double, tracks: int): void + CDsCantante(cantante: string): string + WriteFileCollection (storeFile: StreamWriter): void + ToString(): string

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

Temporal Databases Research And Practice Lncs 1399

Authors: Opher Etzion ,Sushil Jajodia ,Suryanarayana Sripada

1st Edition

3540645195, 978-3540645191

More Books

Students also viewed these Databases questions

Question

What is the purpose of a credit memorandum?

Answered: 1 week ago