Display Inventory In Console - Retail Items
Apr 7, 2014
Why does it keep giving me the error saying that RetailItem[] inventory not found(from the parameter) if its stated above?
RetailItem[] inventory = {jacket, jeans, shirt};
//Display the inventory in the console
display(inventory)
//Process a series of RetailItem sales
processSales(inventory);
//Display the updated inventory of Retailitems
display(inventory);
[Code] .....
View Replies
ADVERTISEMENT
Feb 28, 2015
I am trying to create a GUI with already existing code. My assignment is: Modify the Inventory Program to use a GUI. The GUI should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In addition, the GUI should display the value of the entire inventory, the additional attribute, and the restocking fee.
Where to start. The text book does not cover a GUI that displays this type of information rather it just displays graphics. I would like to create a separate class that holds the GUI information just to make everything flow better. I have provided my current code below:
Java Code:
// ProductTest.java
// by JakeB
public class ProductTest {
// main method begins
public static void main(String[] args) // begin main {
myGUI display = new myGUI();
display.setVisible(true);
[Code] .....
This is all I have for the GUI. I am at a total loss and I am behind 2 weeks now. I cannot move forward until I am able to get this done and the class ends next week.
View Replies
View Related
Apr 30, 2014
for my assignment I am to only add the sort and total inventory methods in the inventory class. And not create an array in the inventory class at all. My inventory class should contain all the variables needed to use with the two new methods: sort and calculate total inventory.By not creating any array in the inventory class and not touching the variables at all.
What I have came up with is:
public class inventory
{
private int prodNumber; // product number
private String prodName; // product name
private int unitsTotal; // total units in stock
private double unitPrice; // price per unit
private double totalInventory; // amount of total inventory
// initialize four-argument constructor
[Code] ....
The error message I get is:
F:Java Programminginventory.java:62: error: cannot find symbol
return prodName.compareTo ( s. getprodName() );
^
symbol: method getprodName()
location: variable s of type inventory
1 error
View Replies
View Related
Mar 29, 2014
I have a problem with my code,in fact I can't output the stream from console to my jTextarea,this is my code:
public class AudioFrame extends javax.swing.JFrame {
static double[] audioFile;
static String audioToDecode;
static String audioKey;
static String outputName;
static String outAudio;
static String name;
static int command;
static String textToEncode;
[Code]...
View Replies
View Related
Apr 7, 2014
I want to get current RAM usage of my computer and display it in Console View of Eclipse? How can I achieve this?
View Replies
View Related
Jun 24, 2014
Create a class that allows the user to select a file and output the contents of the file to the console. Recommend using a text file to display, java files are text files. You may want to put this code in a method to allow you to complete the remainder of this assignment without overwriting your code.
- You should ask the user to enter the full path to your file to make certain you are processing the correct file.
- Modify your code/add a method to display the contents of the file in reverse order. You do not need to reverse the characters on each line but simply output the lines of the file in reverse order.
Hint: read the content of the file into an ArrayList and then traverse the ArrayList.
this is what i go so far.
package classActivity;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Select
{
public static String enterFilePath()
[Code] ....
View Replies
View Related
Apr 5, 2014
I need instantiating 3 instances of the RetailItem
//Instantiate 3 RetailItems
RetailItem jacket = new RetailItem(); ITS TELLING ME: constructor RetailItem in class RetailItem cannot be applied to given types
jacket= jacket.setDescription("Jacket"); <------- ITS TEllING ME: cannot find symbol
jacket = jacket.setUnitsOnHand(12);
jacket = jacket.setPrice(59.95);
[Code] ....
View Replies
View Related
Apr 27, 2014
I have to make a cash register class that can be used with a RetailItem class that I did in another assignment. It should simulate the sale of an item. It should have a constructor that accepts a RetailItem object as an argument, and the constructor should also accept an integer that represents the quantity of the items being purchased.
I have no errors but here is the output I am getting:
How many candy bars are you buying? 5
Subtotal : $0.00
Sales tax : $0.06
Total : $0.06
BUILD SUCCESSFUL (total time: 3 seconds)
The code I have so far below:
CashRegister Class
package cashregisterdemo;
public class CashRegister {
private RetailItem retailItem;
private int quantityItems;
private final double SALES_TAX = .06;
private int Subtotal;
public CashRegister()
[code]...
View Replies
View Related
Jan 22, 2014
I'm going to make Dekstop Based Home Inventory, do you have a tutorial for it ?
View Replies
View Related
Jul 16, 2014
My instructor gave me this code to use as my Array sort. I can not get this to work. I do not get any compile errors, the code just does not do anything.
Java Code:
package inventoryprogram4;
import java.util.Scanner;
public class Inventoryprogram4
{
static GUI mainGUI = new GUI();
static String outText = "";
[Code] .....
View Replies
View Related
Apr 30, 2014
for my assignment I am to only add the sort and total inventory methods in the inventory class. And not create an array in the inventory class at all. My inventory class should contain all the variables needed to use with the two new methods: sort and calculate total inventory.By not creating any array in the inventory class and not touching the variables at all.For the inventoryTest class, I only need to declare an array of the inventory class by making an instance of the inventory.
public class inventory
{
private int prodNumber; // product number
private String prodName; // product name
private int unitsTotal; // total units in stock
private double unitPrice; // price per unit
private double totalInventory; // amount of total inventory
[code]...
View Replies
View Related
Feb 3, 2014
I am stumped on a coding project I am working on. I am making an inventory program with predefined values for the items. I am not sure how to iterate through my arrayList, and allow the user to input the "number sold."
I have made an arrayList and populated it using the add(), but I am not sure if it is working correctly. This is my inventoryItem class :
package inventory;
import java.text.DecimalFormat;
public class inventoryItm {
String itemName;
double unitPrice;
int numberSold;
[Code] .....
View Replies
View Related
Oct 13, 2014
I created a Test main method to test my Inventory and InventoryItem class to see if they are functioning properly. I am currently trying to read a text .dat file, but I keep getting "...cannot find symbol" for descripIn when I try to compile it.
import java.util.Scanner;
import java.util.ArrayList;
import java.io.IOException;
import java.io.File;
[Code].....
View Replies
View Related
Sep 13, 2014
I'm working a an assignment for my IT/215 class and I'm having a little trouble with my arrays. My code compiles just fine but when it comes to displaying the information I've input into my array it doesn't seem to want to and I'm not sure what I'm doing wrong here. On line 136 originally I had [DVDs [count] = count+1]] but it wouldn't compile. I then put line 136 to [ DVDs[count] = new Inventory();] and I think that's were my issue is but I'm not sure....
// Purpose:the purpose of this software is to display inputs as wells as the stocks and price of inputs.
class Inventory
{
private double ItemNumber; //to store Item number
private String ItemName; //to store Item name
private double UnitsInStock; //to store number of units in stock
private double UnitPrice; //to store Unit price
private double InventoryValue; //to store Inventory value
private double TotalInventory; //to store Total Inventory value
[Code] .....
View Replies
View Related
Feb 11, 2015
My program is supposed to be used to keep track of inventory for a company. The user is prompted with a menu that asks them which item they want to update and then gives them another menu that allows them to buy, sell, or change the price of the items. For this, I need to have the variable values to change (based on the input of the user), because they are initially set to specific numbers. How would I do this?
Here's the part of my code that is relevant to this question:
balance = 4000.00;
lampQuantity = 400;
lampPrice = 10;
chairQuantity = 250;
chairPrice = 20.00;
deskQuantity = 300;
deskPrice = 100.00;
System.out.println("Current Balance: $" + balance);
System.out.print("1. Lamps " + lampQuantity);
System.out.println(" at $" + lampPrice);
System.out.print("2. Chairs " + chairQuantity);
System.out.println(" at $" + chairPrice);
[Code] .....
View Replies
View Related
Feb 15, 2015
The goal was to add a few buttons an add delete modify search and save. I feel like I have the entire need satisfied. I'm having a few symbol problems which I'm not quite sure how to fix.
My full code is:
import javax.swing.*;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.awt.event.*;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
[Code] ....
which is directing me towards Prodname on the far right of the if statement. I'm not sure what the problem is. I've double checked my spellings several time for each spot and I cant quite get it.
Everyone has told me but I am aware that I made some bad decisions with the variables being capitalized this was my first go at a program and my instructor didn't let me know that thats the normal way to do it.
View Replies
View Related
Apr 30, 2015
I'm getting ready to code a program that takes record of items loaned and return in a table. I want more than one user to access the program to be able to update the data in the table. For instance, if one user added 5 new items to the table, all other users would be able open the program to see a modified table with 5 new items. Was looking for some advice and was wondering if implementing a database would work best.
View Replies
View Related
Oct 26, 2014
I need to write a program that will create an inventory file as a random access file. The problem that I am having is that among the things I need to add to the random access file is a "car name". Since random access files are byte based I don't know how I could possibly write and then read a string value.
View Replies
View Related
Apr 29, 2014
It isn't messing up it just keeps making me make my arraylist static and i'm not sure why.
public class driver
{
private static ArrayList<AddItems> items;
public driver()
[Code]....
View Replies
View Related
Jan 26, 2015
I try to create a jsf project within ejb which is add new car with entering attributes listing attributes and search by make.
Add and list methods working well , but have problem of list method. I tryed many combinations (using enhanced loop, iterative loop) but i cant provide working well. Always outputText returns nothing ,when i enter attributes.
Here is ejb code for adding ,getting and listing car items :
@Stateful
public class CarsBusiness implements CarsBusinessLocal {
List<Car> cars;
public CarsBusiness() {
cars = new ArrayList<Car>();
[Code] .....
View Replies
View Related
Mar 11, 2014
I facing issue with nested <c:forEach in my jsp page.I am using jstl.jar..Here is my code
in JAVA I have -->
List<ProductDefViewBean> productList = new ArrayList<ProductDefViewBean>();
productList.add(objProductDefViewBean);
request.setAttribute("ProductList", productList);
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
[code]...
javax.servlet.jsp.JspTagException: Don't know how to iterate over supplied "items" in <forEach>
View Replies
View Related
Jan 4, 2015
I made my items class and I am storing my item as a String array to list them all and what I want to be able to do is type pickup, have the game read my location and display the items that are avaible to pickup at current location then type the item and store it in my playerInventory. Then, have it check the slot if it is doesn't equal null go to next.
Use a boolean value of 0 = false and 1 = true. then, have it check if the inv array = 1 or 0. if 1 go to next inv. If all are full then, ask player if they would like to replace an item. Use a 2d array for storage for slots and true or false value.
Here is my code
Player.java
package com.PenguinGaming;
import java.util.Random;
import java.util.Scanner;
public class Player {
public void User(){
Commands commands = new Commands();
Map map = new Map();
[Code] .....
View Replies
View Related
Feb 13, 2014
I have the following code. how can items be added to that list?
private List<IComponentNode> comp;
interface IAAAView {
// returns component with given code or null
IComponentNode findComp(String a);
// returns component with given renderer or null
[Code] .....
View Replies
View Related
Mar 11, 2015
I tried implementing the bubble sort algorithm into my code, but now my output for the second array (in my code) is giving me a ton of zeros. How I can fix it so the zeros are removed and the only thing that remains in the output for my second array are the fixed numerically?
The first array is the original list of items, and the second array is a copy of the first array, but numerically adjusted.
public static void main(String[] args) {
System.out.println("Input up to '10' numbers for current array: ");
int[] array1 = new int[10];
int i;
Scanner scan = new Scanner(System.in);
[code]...
View Replies
View Related
Apr 17, 2014
How would I change items in the main menu (top of screen) that has the app's name on it (e.g. Firefox)? I've used :
System.setProperty("apple.laf.useScreenMenuBar", "true");
And it works, but how would I change things like "About [thisapp]" and make it execute a certain method?
View Replies
View Related
Nov 16, 2014
I need to somehow compare the random color chosen from the color array and the random name selected from the name array. I know how to compare to entire arrays of the same type such as integers. How to go about this with two different arrays. I thought maybe I could parse the color array selection to a string but had no luck with that either.
Problem #1: Design and implement an Applet that plays a simple game to teach a child to read. The game displays a picture on the left hand side of the Applet and a word on the right hand side. Below the pictures are two buttons for the child to click--one if the word matches the picture, the second of the word doesn't match the picture. Display an error message if the child is incorrect (or play a sound). Display (or play a sound) display words of encouragement if the child chooses correctly. Add a loop so the child can keep playing.
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
import java.util.ArrayList;
import java.util.Random;
[Code] ....
View Replies
View Related