Welcome to Dream.In.Code
Become a Java Expert!

Join 149,767 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 2,600 people online right now. Registration is fast and FREE... Join Now!




beginning programming questions.

 
Reply to this topicStart new topic

beginning programming questions.

shaila
19 Feb, 2007 - 08:29 PM
Post #1

New D.I.C Head
*

Joined: 18 Feb, 2007
Posts: 1


My Contributions
Hi, I am in an Intro to Programming Class and am working on an assignment. We must have three classes, Main, Order, and GUI. I need help with the set and get methods etc to operate this program.
this is my code for one of my classes. i am not asking for you to do the rest for me, i just need help starting on my other two classes and how to put it all together, or if anyone knows any examples of this type of program that I could use for reference? I attached the program requirements. any help/guidance will be GREATLY appreciated.
thank you.

CODE

import javax.swing.JOptionPane;

public class LS4309clsMain
{
    public static void main (String args[])
    {
        String strInput;
        String strCustomerID;
        String strCustomerOrderID;
        String strProductCategory;
        String strQuantitySold;
        String strUnitPrice;
        String strOutput;
        
        strCustomerID = JOptionPane.showInputDialog ("Enter the Customer ID");
        strCustomerOrderID = JOptionPane.showInputDialog ("Enter the Customer Order ID");
        strProductCategory = JOptionPane.showInputDialog ("Enter the Product Category\n1 = Beverages  2 = Condiments  3 = Confections\n4 = Diary  5 = Grains  6 = Meat/Poultry\n7 = Produce  8 = Seafood");
        strQuantitySold = JOptionPane.showInputDialog ("Enter the Quantity Sold");
        strUnitPrice = JOptionPane.showInputDialog ("Enter the Unit Price");
        
        
        strOutput = "Customer ID: " + strCustomerID + "\nOrder Number: " + strCustomerOrderID + "\n" + strQuantitySold + " " + strProductCategory + " sold at " + strUnitPrice;
        
        JOptionPane.showMessageDialog(null, strOutput, "LS4309clsMain", JOptionPane.INFORMATION_MESSAGE);
        
    } // End Method - main

} // End Class LS4309clsMain





Attached File(s)
Attached File  MISB310SP07A2.doc ( 100k ) Number of downloads: 34
User is offlineProfile CardPM
+Quote Post

NickDMax
RE: Beginning Programming Questions.
20 Feb, 2007 - 02:18 PM
Post #2

2B||!2B
Group Icon

Joined: 18 Feb, 2007
Posts: 2,869



Thanked: 53 times
Dream Kudos: 550
My Contributions
Glad I am not in your class. I find the assignment confusing at best. It is really meant to be read by the students of the class.

However this is not a hard assignment. I didn't see the example dialog boxes but I can't imagin they would be all that hard.

You should learn your way about the Java API. This is a great place to gen both info and examples. The classes and functions that your teacher request you learn are all there.

Apart from that code some and get back to me.


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 06:22AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month