473,513 Members | 2,563 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

i want to know how to implement a CD class for a CD Store

2 New Member
Design and implement a CD class for a CD Store. A CD has 4 instance variables: title (String), artist (String), price (double) and number of copies sold (int). It has a constructor which takes all 4 parameters (in the order specified). There is an accessor method for each instance variable, but no mutator methods. There is also a toString method which returns a String formatted "Album title. Artist $Price. Copies sold: #". For example "Hot August Night. Neil Diamond $16.50. Copies sold: 8"
Oct 15 '08 #1
2 1252
JosAH
11,448 Recognized Expert MVP
There's no need for thinking anymore; your assignment text told it all.

kind regards,

Jos
Oct 15 '08 #2
Nepomuk
3,112 Recognized Expert Specialist
There's no need for thinking anymore...
...as long as you know how to write a class in java. Do you? If you don't, you should check the sun tutorials which are linked here. (There's also more on that page, so take your time.)
Also, you may want to check our Java Articles Section.

Greetings,
Nepomuk
Oct 15 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
9965
by: Kent | last post by:
Hi! I am working with an obscure graphics library in school as a university C++ programming project. The graphics library has a class kalled Bitmap wich you use to draw graphics (you can "stamp...
1
6155
by: javaq | last post by:
I am using Oracle9iR2 / JDBC. I need to implement a search facility similar to google.com on the database I have. There are 20 tables in the database and around 30000 records in total. I have to...
8
6793
by: Tron Thomas | last post by:
As part of applying for a programming position at a company, I recently I had submitted some code samples to one of the developers for review. This is the feedback I received: One of his...
10
44436
by: Atul | last post by:
Hi, I just stepped into C#. I am facing one problem. Here is the scenario. I am posting some data to one website (https site). It returns me response HTML. I want to parse this HTML and want to...
4
2109
by: Chris F Clark | last post by:
Please excuse the length of this post, I am unfortunately long-winded, and don't know how to make my postings more brief. I have a C++ class library (and application generator, called Yacc++(r)...
5
1267
by: Mario Krsnic | last post by:
Hello everybody, This works in vb.net. The value of n increments: Public Class Form1 Dim n% Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
11
1805
by: Manuel | last post by:
Hi, I need implement a map of member functions of some class. This map is formed by a string and a pointer to the member function. The problem is that the map need that the object saved are...
37
3894
by: jht5945 | last post by:
For example I wrote a function: function Func() { // do something } we can call it like: var obj = new Func(); // call it as a constructor or var result = Func(); // call it as...
5
1073
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
I am developing a new application. Since it is being developed from scratch, I want to implement a lot of threading - especially for my SQL calls. The problem I noticed is that I can't seem to...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7380
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7523
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5683
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5085
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1592
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.