473,804 Members | 3,638 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error: end public class Inventory3

8 New Member
Hello I am going to give a program that I have done, but I have to modifiy it, but I need help okay can you help ?
Here the program I need help to straighten up below:

the Java error is right at the point is at the end of the program.

Expand|Select|Wrap|Line Numbers
  1. //week 6 Inventory3
  2. // by Tina Jones
  3. // IT 215
  4. // october 07/2007
  5. import java.util.Scanner;  
  6. public class Inventory3     
  7. {    
  8. class restockfee3
  9.  { 
  10.  //Inventoryprogrampart3
  11.  // Created on October 5, 2007, 10:19 PM
  12.   //To change this template, choose Tools | Template Manager and open the template in the editor.
  13.  
  14.  {
  15.  // Creat a calculation for restock fee
  16.  //Create a new instance of Inventoryprogrampart2
  17. // Create private varibles
  18.  //Create a constructor Inventory2 varibles
  19. //  private main method begins program execution 
  20. //  Create a new instance for class Inventory2
  21.  // create a new instance for ProductGUI1
  22. class array1
  23. {
  24. public static void main ( String args[] )
  25. {
  26. // array of stock number
  27.  product array []={ doll ,computer , car, list};
  28. //array of product
  29.  number array[]={ 1 , 2 , 3 , 4};
  30. // array of item number
  31.  value array []={  $29, $600, $23};
  32. // array of price
  33.  stock array []={ 43436, 65656,76767};
  34.  //array of stock number
  35.     class Sortmethod1
  36.     {
  37. // Create private varibles
  38.  //Create a constructor sortmethod1 varibles
  39. //  private main method begins program execution 
  40. //  Create a new instance for sortmethod1
  41.  // create a new instance for arrayGUI1
  42.     private  String name; //sets varialbe
  43.     private int Number; //sets inventory number
  44.     private int units = Numbers ;// sets Unit number
  45.     private double Stock = numbers; // sets the stock amount
  46.     private double Price = dollars;//sets price with restock fee of 5%
  47.     private double invPrice; 
  48.     //Create a constructor array list1 varibles
  49. //  private main method begins program execution 
  50. //  Create a new instance for array list1
  51.  // create a new instance for array listGUI1
  52.     // getmethod for array list GUI
  53.   private static void main ( String name, int number, int units, double stock, double price, double invprice[])    
  54.   {
  55.     product name = name;// getproduct name
  56.     item number = number;//getitem number
  57.     units = number;// getunits number
  58.     stock = number;// getstock number
  59.     price = number;// getprice number
  60.     restock fee= number;// getrestock fee
  61.   Scanner input = new Scanner( System.in ); //user input
  62.   // Create a sort method for  product name array list
  63.   System.out.printf("%s\n%s\n","use sort method for Product name array");
  64.   System.out.printf("Please Enter Name of Product");
  65.   String  name = input.nextLine();
  66.   // array of product
  67.   // start array constructor 
  68.   System.out.printf("\nList of Products");
  69.   System.out.printf("%s\n%s\n","use sort method for Item number array");
  70.   System.out.printf("Please Enter Item number");//Needs  be a number
  71.   double number = input.nextDouble();
  72.   System.out.printf("%s\n%s\n","use sort method for product price array");
  73.   System.out.printf("Please Enter Product Price");//Needs  be a number
  74.   double price = input.nextDouble();
  75.   // start array constructor
  76.   //perform verious opreations of the data
  77.   //create a list method for array
  78.   // create a sort method for stock number array list
  79.   System.out.printf("%s\n%s\n","use sort method for stock array");
  80.    System.out.printf("Please Enter Stock Number");// Need be a number
  81.    double number = input.nextDouble();
  82.   // create a calculation for restock fee of 5%
  83.   //start calculation constructor
  84.   System.out.printf("%s\n%s\n","user enters a restock fee is: 5%");
  85.   double fee = input.nextDouble();
  86.   //Output Display
  87.  System.out.printf("Product name:%s\n","name");
  88.  System.out.printf("Item number:%s\n","number");
  89.  System.out.printf("Item price:%s\n","price");
  90.  System.out.printf("Stock number:%s\n","number");
  91.  System.out.printf("use a sort method for array lists:%s\n","all array list a-z listings");
  92.  System.out.printf("A Restock fee:%s\n","calculation fee");
  93.  }// end sub public class sortmethod
  94.  ) // end public class Inventory3
the line error that I am gettins here: ) // end public class Inventory3

so far do you have any sugguestions how to improve my program?
Oct 15 '07 #1
11 2443
MMcCarthy
14,534 Recognized Expert Moderator MVP
Hi Tina and welcome to thescripts.

I have added code tags to your code and changed the title to make it more readable.

I am going to move it over to the Java forum where our Java experts will try to assist you.

Mary
Oct 15 '07 #2
MMcCarthy
14,534 Recognized Expert Moderator MVP
However, I can actually guess at your problem. You have opened a number of classes including Main but you haven't closed them all.
Oct 15 '07 #3
TinaJones095
8 New Member
okay but this just one example of the errors I am getting. I am trying to get it right
Oct 15 '07 #4
MMcCarthy
14,534 Recognized Expert Moderator MVP
okay but this just one example of the errors I am getting. I am trying to get it right
You can't pinpoint the errors unless you close the classes properly. Go through the code an put closing brackets in where required before proceeding. Then repost with the errors you are now getting. The Java experts will take it from there.
Oct 15 '07 #5
TinaJones095
8 New Member
However, I can actually guess at your problem. You have opened a number of classes including Main but you haven't closed them all.
Do you think You can help deveolpe a Inventory program that can be with these things
[ Product array]
the products are[dolls] [computers] [cars]
need a product class program.
then Need a
[Item number array]
numbers were in the program that I gave you.
[price array]
also need a
[stock array]
then need a format to do a restock fee of 5%
then need a format to do a sort method.
I will need some type of super class
I need a Item number program that will let the user to type in the product name, item number the price, and to list stock as display, then I need to include a restock fee of 5%. I also have to have a sort method. Next I have to have a super class.
then I need a logo or logo obect for the inventory program.I am needing to work on Inventory 4 for my class. But because of these errors I am needing help.
Oct 15 '07 #6
TinaJones095
8 New Member
You can't pinpoint the errors unless you close the classes properly. Go through the code an put closing brackets in where required before proceeding. Then repost with the errors you are now getting. The Java experts will take it from there.
I do not know where start on closing the classes can you help me here go though each part.
Oct 15 '07 #7
TinaJones095
8 New Member
I do not know where start on closing the classes can you help me here go though each part.
Okay [Error codes on Lines 38 41 44 47 50 53 138] of the reposted program okay below here is the program/


//week 6 Inventory3
// by Tina Jones
// IT 215
// october 07/2007
import java.util.Scann er;
public class Inventory3
{
class restockfee3
{
}
class Inventoryprogra mpart2
{
}
class array1
{
}
public static void main ( String args[] )
{
// array of stock number
product array []={ doll ,computer , car, list};
//array of product
number array[]={ 1 , 2 , 3 , 4};
// array of item number
value array []={ $29, $600, $23};
// array of price
stock array []={ 43436, 65656,76767};
}
//array of stock number
class Sortmethod1
{
}
// Create private varibles
//Create a constructor sortmethod1 varibles
// private main method begins program execution
// Create a new instance for sortmethod1
// create a new instance for arrayGUI1
{
private String name; //sets varialbe
}
{
private int Number; //sets inventory number
}
{
private int units = Numbers ;// sets Unit number
}
{
private double Stock = numbers; // sets the stock amount
}
{
private double Price = dollars;//sets price with restock fee of 5%
}
{
private double invPrice;
}
//Create a constructor array list1 varibles
// private main method begins program execution
// Create a new instance for array list1
// create a new instance for array listGUI1
// getmethod for array list GUI
private static void main ( String name, int number, int units, double stock, double price, double invprice[])
{
product name = name;// getproduct name
item number = number;//getitem number
units = number;// getunits number
stock = number;// getstock number
price = number;// getprice number
restock fee= number;// getrestock fee
}
{
Scanner input = new Scanner( System.in ); //user input
}
// Create a sort method for product name array list
{
System.out.prin tf("%s\n%s\n"," use sort method for Product name array");
}
{
System.out.prin tf("Please Enter Name of Product");
}
{
String name = input.nextLine( );
}
// array of product
// start array constructor
{
System.out.prin tf("\nList of Products");
}
{
System.out.prin tf("%s\n%s\n"," use sort method for Item number array");
}
{
System.out.prin tf("Please Enter Item number");//Needs be a number
double number = input.nextDoubl e();
}
{
System.out.prin tf("%s\n%s\n"," use sort method for product price array");
}
{
System.out.prin tf("Please Enter Product Price");//Needs be a number
double price = input.nextDoubl e();
}
// start array constructor
//perform verious opreations of the data
//create a list method for array
// create a sort method for stock number array list
{
System.out.prin tf("%s\n%s\n"," use sort method for stock array");
}
{
System.out.prin tf("Please Enter Stock Number");// Need be a number
double number = input.nextDoubl e();
}
// create a calculation for restock fee of 5%
//start calculation constructor
{
System.out.prin tf("%s\n%s\n"," user enters a restock fee is: 5%");
double fee = input.nextDoubl e();
}
//Output Display
{
System.out.prin tf("Product name:%s\n","nam e");
}
{
System.out.prin tf("Item number:%s\n","n umber");
}
{
System.out.prin tf("Item price:%s\n","pr ice");
}
{
System.out.prin tf("Stock number:%s\n","n umber");
}
{
System.out.prin tf("use a sort method for array lists:%s\n","al l array list a-z listings");
}
{
System.out.prin tf("A Restock fee:%s\n","calc ulation fee");
}
} // end sub public class restock fee
} // end Inventory3
Oct 15 '07 #8
TinaJones095
8 New Member
I need some help building a better program can you or anyone help me?
Oct 15 '07 #9
TinaJones095
8 New Member
I need some help building a better program can you or anyone help me?
I tell you what I will give you the Inventory 1, 2, 3, and possiblity 4 can you help me in getting this done by tommow it is passed due, please help!!!

//Inventory1
//IT 215
//by Tina Jones
import java.util.Scann er;

public class Inventory1 {
public static void main( String name, int number, double units, double stock, double price, double invprice[])
{
public String name();
public int Number; //sets inventory number
public int units = Numbers ;// sets Unit number
public double Stock = numbers; // sets the stock amount
public double Price = dollars;//sets price of
public double invPrice;
}
{
system.out.prin tf("Please Enter Product Name");
string name = input.nextLine( );
System.out.prin tf("Please Enter Item number");
double number = input.nextDoubl e();
System.out.prin tf("Please Enter Stock Number");// Need be a number
double number = input.nextDoubl e();
}
//Output Display
System.out.prin tf("Product name:%s\n","nam e");
System.out.prin tf("Item number:%s\n","n umber");
System.out.prin tf("Item price:%s\n","pr ice");
System.out.prin tf("Stock number:%s\n","n umber");
}// end class Inventory1
[help]
error on 9-13,25-27
Oct 15 '07 #10

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

Similar topics

4
1993
by: Steve Long | last post by:
Hello, I hope this is the right group to post this to. I'm trying to serialize a class I've written and I'd like to be able to serialze to both binary and xml formats. Binary serialization is working fine but when I try to instantiate an XmlSerializer object with: Dim xmls As New XmlSerializer(GetType(CLayerDefinition)) I get the following error:
6
4764
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much appreciated. Thanks in advance
4
2861
by: Troy | last post by:
We recently installed the .Net framework on a windows 2000 server. Shortly after that we experienced intermitant problems running a web based program that accesses an Access 2002 database. The intranet .asp program works, but as soon as it tries to access the database for normal users, it gives us an "unspecified error" and that it can't access the data base. As the administrator, I found my access was relatively stable. Anyone else...
4
6413
by: Sanjay Kumar | last post by:
Folks ! I am working with VC++ after a long time and having problem linking latest xerces 2.7 in VC++ 2005 Express Edition. I have done following: 1. downloaded and unpacked the the library: http://www.apache.org/dist/xml/xerces-c/binaries/xerces-c_2_7_0-windows_2000-msvc_60.zip
1
3294
by: developer | last post by:
Hi All I have made a .NET project. the files included are borland c++ files that i am migrate to VC++ .NET I am using Microsoft Visual C++ .NET 2003. the compilation goes through properly, but throws a load of linker errors
2
2759
by: dasilva109 | last post by:
Hi guys I am new to C++ and need urgent help with this part of my code for a uni coursework I have to submit by Thursday //ClientData.h #ifndef CLIENTDATA_H #define CLIENTDATA_H #include <string>
0
2061
by: erik.erikson | last post by:
I am getting a compiler error that I can't well explain or even understand the origin of (though I boiled it down close...). Below is a bare-bones example. What I am doing is defining the increment operator in a class and then defining a derived class and using the derived class. When I try to use the increment operator on an instance of the derived class (as an instance of the derived class, not when used as an instance of the base...
4
2174
by: BenCoo | last post by:
Hello, In a Binary Search Tree I get the error : Object must be of type String if I run the form only with the "Dim bstLidnummer As New BinarySearchTree" it works fine. Thanks for any help on this, Benny
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10319
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10076
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9144
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7616
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4297
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 we have to send another system
2
3816
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.