Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old August 5th, 2004, 11:43 AM
Friend of Wrox
 
Join Date: Jul 2004
Location: Tehran, , Iran.
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

maybe in my code there are some public variable you should convert them to Properties but for simplicity I don't do that....

--------------------------------------------
Mehdi.:)
Reply With Quote
  #12 (permalink)  
Old August 5th, 2004, 12:54 PM
Authorized User
 
Join Date: Jul 2004
Location: , , India.
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for precious time spending with me. u know c means it beneficial to me
I don't know C#.

But my specialisation will be in .Net
so it is more useful to me.

Also say to me what is the difference btwn C & C#.

I want to know it is possible to do this program i.e "Library management system"
in C.

Reply With Quote
  #13 (permalink)  
Old August 5th, 2004, 12:56 PM
Friend of Wrox
 
Join Date: Jul 2004
Location: Tehran, , Iran.
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

wait another hour!!!

--------------------------------------------
Mehdi.:)
Reply With Quote
  #14 (permalink)  
Old August 5th, 2004, 12:58 PM
Friend of Wrox
 
Join Date: Jul 2004
Location: Tehran, , Iran.
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

realy there is no difference but C# is easier.


--------------------------------------------
Mehdi.:)
Reply With Quote
  #15 (permalink)  
Old August 5th, 2004, 01:04 PM
Friend of Wrox
 
Join Date: Jul 2004
Location: Tehran, , Iran.
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

even I don't use properties,like C

--------------------------------------------
Mehdi.:)
Reply With Quote
  #16 (permalink)  
Old August 5th, 2004, 01:32 PM
Authorized User
 
Join Date: Jul 2004
Location: , , India.
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Mehdi can u say what is the time Iran

No problem take ur own time to do this

But in c# can we store the data in database

Reply With Quote
  #17 (permalink)  
Old August 5th, 2004, 01:32 PM
Friend of Wrox
 
Join Date: Jul 2004
Location: Tehran, , Iran.
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

before you go to sleep..it's better I tell you something
first I think we need here three base classes for Users,Books,managing the libraray
here this is the firs class(it's not complete)....
Have a look at it anyway...
=============================================
    public class User
    {
        private int userID;
        private string firstname;
        private string lastname;
        private string phonenumber;
        private string address;
        private DateTime DateUserBorrowed;//the date user borrows the book
        private DateTime DateUserBrought;//the date user brings back the book
        public Book TheLastBook;//current book or the last book the user has borrowed
        public static int count;
        public int a;
        private Stack ListOfBooksBorrowed=new Stack();//this stack shows all books this user borrowed
        public User()
        {
        }
        public User(int UserID,string FirstName,string LastName,string PhoneNumber,string Address)
        {
            this.userID=UserID;
            this.firstname=FirstName;
            this.lastname=LastName;
            this.phonenumber=PhoneNumber;
            this.address=Address;
            count++;//a static vaiable when evry instances created increases one unit
        }
        public int GetUserID()
        {
            return this.userID;
        }
        public string GetFirstName()
        {
            return this.firstname;
        }
        public string GetLastName()
        {
            return this.lastname;
        }
        public string GetPhoneNumber()
        {
            return this.phonenumber;
        }
        public string GetAddress()
        {
            return this.address;
        }
        public void PrintProperties()
        {
            //this prints all the fields on screen
        }
        public DateTime GetDateUserBorrowed()
        {
            return this.DateUserBorrowed;
        }
        public DateTime GetDateUserBrought()
        {
            return this.DateUserBrought;
        }
        public void SetDateUserBorrowed(int year,int month,int day)
        {
            this.DateUserBorrowed=new DateTime(year,month,day);
        }
        public void SetDateUserBrought(int year,int month,int day)
        {
            this.DateUserBrought=new DateTime(year,month,day);
        }
        public bool HasBorrowedAnyBook()
        {
            bool result=true;
            if(TheLastBook==null) result=false;
            return result;
        }
        public int fine()
        {
            DateTime now=DateTime.Now;
            if(!this.HasBorrowedAnyBook())return 0;//not complete
        }

    }
=====================================

any better opinion greatly appreciated

--------------------------------------------
Mehdi.:)
Reply With Quote
  #18 (permalink)  
Old August 5th, 2004, 01:37 PM
Friend of Wrox
 
Join Date: Jul 2004
Location: Tehran, , Iran.
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

in Iran time is 11:20 PM


--------------------------------------------
Mehdi.:)
Reply With Quote
  #19 (permalink)  
Old August 5th, 2004, 01:52 PM
Friend of Wrox
 
Join Date: Jul 2004
Location: Tehran, , Iran.
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

ask your questions....

--------------------------------------------
Mehdi.:)
Reply With Quote
  #20 (permalink)  
Old August 5th, 2004, 02:12 PM
Friend of Wrox
 
Join Date: Jul 2004
Location: Tehran, , Iran.
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

I will go it on tomorrow about 7:30 PM(GMT)

--------------------------------------------
Mehdi.:)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off




All times are GMT -4. The time now is 09:34 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.