473,395 Members | 1,905 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

need help with class

4
i need to write a programby using a class AdressBookType which can perform following actions
load the data into the address book from a file
search the person by last name
print the address phone numbers and date of births
print the names of people whose birthdays are in a given month
help me as much as you can
Oct 26 '06 #1
2 1366
manontheedge
175 100+
you have to think about it first. What do you need?

a function to read from a file, so find out how to read a file...after that, you can figure out how to store the information into arrays,

you'll need a search algorithm, there's plenty out there...look around the internet for some code examples

the printing name with a given month...that could be as simple as a bunch of 'if' statements

the printing will be easy, once you can store the information into arrays

i'm not trying to be a dick and not help, i'm just trying to point out, it won't get any easier, you have to learn this stuff. If you don't know where to start, break it down and look at it in pieces. It's not hard, it's just frustrating because you have to keep learning constantly. If you get stuck writing the code, then post the code and you'll get help, as long as you try.
Oct 26 '06 #2
Ganon11
3,652 Expert 2GB
i need to write a programby using a class AdressBookType which can perform following actions
load the data into the address book from a file
search the person by last name
print the address phone numbers and date of births
print the names of people whose birthdays are in a given month
help me as much as you can
manontheedge had it right - the first step to solving any problem is breaking it down into smaller steps. You know you need a class addressBookType - but what will it have?

A function to load data - getInfo()
A way to sort through the people inside
Several printing functions.

It might help if you also had another class/struct, called personType. personType can have an address (string), last name and first name (both strings), age (int), birth month (int), birth date (int), birth year (int), and telephone number (either string ("410-555-1234") or int (4105551234)). Then your addressBookType class can have an array of x number of personType variables - the people in the book. This would, of course, be a private member.

If you need more help further along, go ahead and ask - as manontheedge stated, we're willing to try and help if you're willing to try and help yourself.
Oct 26 '06 #3

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

Similar topics

5
by: Carl Bevil | last post by:
I'm creating a library for internal use that relies on third-party code. I don't want clients of this library to know anything about the third party code, when compiling or running. Generally...
3
by: Tommy Lang | last post by:
I am working on this project and I need some help/pointers/comments to get me started, I am stuck. The program will be used to store information in an array while it is running. I need to store...
8
by: JustSomeGuy | last post by:
I need to write an new class derived from the list class. This class stores data in the list to the disk if an object that is added to the list is over 1K in size. What methods of the std stl...
5
by: Benne Smith | last post by:
Hi, I have three enviroments; a development, a testing and a production enviroment. I'm making a big application (.exe), which uses alot of different webservices. I don't use the webservices...
1
by: Juan Dent | last post by:
Hi, The Request.SaveAs method stores in a file the complete HTTP request including the HttpVersion. However when I try to reproduce in memory the same thing, I cannot find the "HTTP/1.1"...
12
by: Noel | last post by:
Hello, I'm currently developing a web service that retrieves data from an employee table. I would like to send and retrieve a custom employee class to/from the webservice. I have currently coded...
18
by: bsruth | last post by:
I tried for an hour to find some reference to concrete information on why this particular inheritance implementation is a bad idea, but couldn't. So I'm sorry if this has been answered before....
15
by: Jess | last post by:
Hello, Sometimes declarations are all what we need when we define/declare classes (or functions?), but sometimes we need definitions. I learned that if we define a class (B) that has an object...
1
by: javabeginner123 | last post by:
i have a java prob, and i have to solve it fast, but i'm just getting to know it, so plz help me solve it with full code completed, thanks so much. the prob is to create a monter fight and there is...
20
by: d.s. | last post by:
I've got an app with two classes, and one class (InventoryInfoClass) is an object within the other class (InventoryItem). I'm running into problems with trying to access (get/set) a private...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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
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,...

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.