trying to connect a product class to the main class but i am getting errors i don't understand.like
C:\Users\Juanelle\Documents\OOP Final Project\Order Process.java:36: cannot find symbol
symbol constructor Product(java.lang.String,double)
location: class Product
Product product1 = new Product("Roses", 50.00);
and in the error message the arrow is pointing at the n in new.
C:\Users\Juanelle\Documents\OOP Final Project\Order Process.java:37: cannot find symbol
symbol constructor Product(java.lang.String,double)
location: class Product
Product product2 = new Product("SunFlower", 20.00);
and in the error message the arrow is pointing at the n in new.
C:\Users\Juanelle\Documents\OOP Final Project\Order Process.java:38: cannot find symbol
symbol constructor Product(java.lang.String,double)
location: class Product
Product product3 = new Product("Tulips", 30.00);
and in the error message the arrow is pointing at the n in new.
C:\Users\Juanelle\Documents\OOP Final Project\Order Process.java:36: cannot find symbol
symbol constructor Product(java.lang.String,double)
location: class Product
Product product4 = new Product("Orchids", 60.00);
and in the error message the arrow is pointing at the n in new.
import java.util.*;
public class Product{
static Scanner console = new Scanner(System.in);
String Roses = "";
String SunFlower = "";
String Tulips = "";
String Orchids = "";
double[] flowerPrices;
public Product(){
Roses = "";
SunFlower = "";
Tulips = "";
Orchids = "";
flowerPrices = new double[1];
}
public Product(String roses, String sunflower, String tulips, String orchids,
double ... list){
Roses = roses;
SunFlower = sunflower;
Tulips = tulips;
Orchids = orchids;
flowerPrices = list;
}
public String toString(){
String str;
str = String.format("%-10s ",Roses);
str = String.format("%-10s ",SunFlower);
str = String.format("%-10s ", Tulips);
str = String.format("%-10s ", Orchids);
for (double prices : flowerPrices)
str = str + String.format("%7.2f", prices);
//str = str + " " + prices;
return str;
}
}
main
public class OrderProcess {
@SuppressWarnings("deprecation")
public static void main(String[]args){
// Welcome window = new Welcome();
// window.setTitle("Welcome");
// window.pack();
// window.show();
Customer customer = new Customer();
customer.getFirstName();
customer.getLastName();
customer.getAddress();
customer.getPhone();
System.out.println("Customer: " + customer);
SalesClerk salesclerk = new SalesClerk();
salesclerk.getSCFirstName();
salesclerk.getSCLastName();
salesclerk.getSCAddress();
salesclerk.getSCPhone();
System.out.println("SalesClerk: " + salesclerk);
Warehouse warehouse = new Warehouse();
warehouse.checkStock();
Product product1 = new Product("Roses", 50.00);
Product product2 = new Product("SunFlower", 20.00);
Product product3 = new Product("Tulips", 30.00);
Product product4 = new Product("Orchids", 60.00);
System.out.println(product1);
System.out.println(product2);
System.out.println(product3);
System.out.println(product4);
}
}
could someone assist?