DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Thread: Dta Base

  1. #1
    Join Date
    May 2005
    Location
    Ontario, Canada
    Posts
    173

    Dta Base

    Hi all,
    I have modified this one to accept Transistors.
    What I need is: having communication with the user.
    i.e. window to enter a new itme, and another one to get the information from the program.

    // TestToString.java
    //
    //
    // Cut and paste this code into a file named:
    // TestToString.java
    //
    // Compile and run:
    // javac TestToString.java
    // java TestToString
    //
    //
    // From: Joe Grip's Interactive Guide to Java 2

    /*
    class Employee {

    String name;
    int employeeID;
    float salary;

    public String toString() {
    return ("Employee: " + name + " " +
    "ID: " + employeeID + " " +
    "Salary: " + salary );
    }
    }
    */

    class Transistor {

    String transistor;
    String polarity;
    int currentIC;
    String nte;
    //float nte;

    public String toString() {
    return ("Transistor: " + transistor + " " +
    "Ic: " + currentIC + "mA " +
    "NTE: " + nte );
    }
    }

    class TestToString {
    public static void main(String[] args) {
    /*
    Employee bob = new Employee ();
    bob.name = "Robert Zacks";
    bob.employeeID = 2133;
    bob.salary = 45000;

    System.out.println(bob);
    */
    Transistor trx = new Transistor ();
    trx.transistor = "2SC945";
    trx.polarity = "PNP";
    trx.currentIC = 45000;
    trx.nte = "123P";

    System.out.println(trx);
    }
    }

  2. #2
    Join Date
    Oct 2004
    Posts
    311
    try looking into the swing framework

Similar Threads

  1. Microsoft's C++ bigotry
    By Phil Weber in forum .NET
    Replies: 632
    Last Post: 10-01-2003, 12:00 AM
  2. Replies: 7
    Last Post: 10-28-2002, 12:10 PM
  3. Replies: 1
    Last Post: 06-13-2002, 02:52 PM
  4. Replies: 0
    Last Post: 04-01-2002, 12:33 PM
  5. data base
    By Eric in forum ASP.NET
    Replies: 1
    Last Post: 03-23-2000, 03:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links