Please help with a simple gui. No help needed for sql. The production phase prog
ID: 3692350 • Letter: P
Question
Please help with a simple gui. No help needed for sql.The production phase program will be used by regular users at FRED (as opposed to IT staffers). FRED has determined that most customer inquiries come to the business over the telephone (however, we can see that we should easily be able to adapt our software to be web-enabled in the future). Therefore, we want a Java application that will allow our customer service users to provide quotes in a timely manner. Therefore, we will build a “rate quote” GUI. The system will first allow us to select a customer (assume they are already in the DB), an employee giving the quote, and then select part(s) and/or motorcycles. You system should also include the shipping information in the quote. After all of the items have been selected for the rate quote, we should give the user a “bottom line” total that includes shipping (we won’t worry about sales tax in this system). We’d like a hard copy of this quote for future reference. Therefore, you should format the output neatly in the jGrasp System.out.println area for ease of reference (we can then print it later). The output should include the current date, customer, employee and product information as well as the computed total for this quote. Note that we are not updating the database in any way with this system. Later FRED may decide to pay us more money to convert these rate quotes into actual invoices, but we can’t get that into the current release (translation: not this semester!). In a commercial application, we would be concerned about these transactions being atomic (e.g., we would not want to have two users promising the same motorcycle to two customers). However, we will not worry about this detail for this prototype. Nonetheless it is instructive to consider all aspects of what we’ve learned so that we are aware of the limitations of our system. Other aspects that we won’t concern ourselves with are: concurrency, backup, recovery, and security.
As reference CREATE TABLE Customer(
CusId CHAR(11) NOT NULL,
CusFirstName VARCHAR(50) NOT NULL,
CusLastName VARCHAR(50) NOT NULL,
CusCity VARCHAR(50) NOT NULL,
CusState CHAR(2) NOT NULL,
CusZip CHAR(10) NOT NULL,
CusPhoneNumber VARCHAR(30) NOT NULL,
CONSTRAINT PKCustomer PRIMARY KEY(CusId));
CREATE TABLE Motorcycle(
MotorId CHAR(11) NOT NULL,
MotorMake VARCHAR(50) NOT NULL,
MotorModel VARCHAR(20) NOT NULL,
MotorStatus VARCHAR(10) NOT NULL,
MotorYear INTEGER NOT NULL,
CONSTRAINT PKMotorcycle PRIMARY KEY(MotorId));
CREATE TABLE Employee(
EmpId CHAR(11) NOT NULL,
EmpType VARCHAR(20) NOT NULL,
EmpSalary DECIMAL(10,2),
CONSTRAINT PKEmployee PRIMARY KEY(EmpId));
CREATE TABLE Orders(
OrderId CHAR(11) NOT NULL,
OrderDate VARCHAR(50) NOT NULL,
CusId CHAR(11) NOT NULL,
MotorId CHAR(11) NOT NULL,
EmpId CHAR(11) NOT NULL,
CONSTRAINT PKOrders PRIMARY KEY(OrderId),
CONSTRAINT FKCusId FOREIGN KEY(CusId)
REFERENCES Customer (CusId)
ON DELETE SET NULL
ON UPDATE CASCADE,
CONSTRAINT FKMotorId FOREIGN KEY(MotorId)
REFERENCES Motorcycle (MotorId)
ON DELETE SET NULL
ON UPDATE CASCADE,
CONSTRAINT FKEmpId FOREIGN KEY(EmpId)
REFERENCES Employee (EmpId)
ON DELETE SET NULL
ON UPDATE CASCADE);
CREATE TABLE Supplier(
SuppId CHAR(11) NOT NULL,
SuppName VARCHAR(50) NOT NULL,
SuppPhoneNumber VARCHAR(30) NOT NULL,
CONSTRAINT PKSupplier PRIMARY KEY(SuppId));
CREATE TABLE Shipping(
CompId CHAR(11) NOT NULL,
CompRate DECIMAL(10,2),
CompShipMode VARCHAR(50) NOT NULL,
CONSTRAINT PKShipping PRIMARY KEY(CompId));
CREATE TABLE OrderPart(
OrderPartId CHAR(11) NOT NULL,
OrderQuantity INTEGER NOT NULL,
PartId CHAR(11) NOT NULL,
OrderId CHAR(11) NOT NULL,
CONSTRAINT PKOrderPart PRIMARY KEY(OrderPartId),
CONSTRAINT FKPartId FOREIGN KEY(PartId)
REFERENCES Parts (PartId)
ON DELETE SET NULL
ON UPDATE CASCADE,
CONSTRAINT FKOrderId FOREIGN KEY(OrderId)
REFERENCES Orders (OrderId)
ON DELETE SET NULL
ON UPDATE CASCADE);
CREATE TABLE Parts(
PartId CHAR(11) NOT NULL,
PartName VARCHAR(50) NOT NULL,
PartCost DECIMAL(10,2),
Brand VARCHAR(20),
CONSTRAINT PKParts PRIMARY KEY(PartId),
CONSTRAINT FKMotorId FOREIGN KEY(Brand)
REFERENCES Motorcycle (MotorMake)
ON DELETE SET NULL
ON UPDATE CASCADE);
Please help with a simple gui. No help needed for sql.
The production phase program will be used by regular users at FRED (as opposed to IT staffers). FRED has determined that most customer inquiries come to the business over the telephone (however, we can see that we should easily be able to adapt our software to be web-enabled in the future). Therefore, we want a Java application that will allow our customer service users to provide quotes in a timely manner. Therefore, we will build a “rate quote” GUI. The system will first allow us to select a customer (assume they are already in the DB), an employee giving the quote, and then select part(s) and/or motorcycles. You system should also include the shipping information in the quote. After all of the items have been selected for the rate quote, we should give the user a “bottom line” total that includes shipping (we won’t worry about sales tax in this system). We’d like a hard copy of this quote for future reference. Therefore, you should format the output neatly in the jGrasp System.out.println area for ease of reference (we can then print it later). The output should include the current date, customer, employee and product information as well as the computed total for this quote. Note that we are not updating the database in any way with this system. Later FRED may decide to pay us more money to convert these rate quotes into actual invoices, but we can’t get that into the current release (translation: not this semester!). In a commercial application, we would be concerned about these transactions being atomic (e.g., we would not want to have two users promising the same motorcycle to two customers). However, we will not worry about this detail for this prototype. Nonetheless it is instructive to consider all aspects of what we’ve learned so that we are aware of the limitations of our system. Other aspects that we won’t concern ourselves with are: concurrency, backup, recovery, and security.
As reference CREATE TABLE Customer(
CusId CHAR(11) NOT NULL,
CusFirstName VARCHAR(50) NOT NULL,
CusLastName VARCHAR(50) NOT NULL,
CusCity VARCHAR(50) NOT NULL,
CusState CHAR(2) NOT NULL,
CusZip CHAR(10) NOT NULL,
CusPhoneNumber VARCHAR(30) NOT NULL,
CONSTRAINT PKCustomer PRIMARY KEY(CusId));
CREATE TABLE Motorcycle(
MotorId CHAR(11) NOT NULL,
MotorMake VARCHAR(50) NOT NULL,
MotorModel VARCHAR(20) NOT NULL,
MotorStatus VARCHAR(10) NOT NULL,
MotorYear INTEGER NOT NULL,
CONSTRAINT PKMotorcycle PRIMARY KEY(MotorId));
CREATE TABLE Employee(
EmpId CHAR(11) NOT NULL,
EmpType VARCHAR(20) NOT NULL,
EmpSalary DECIMAL(10,2),
CONSTRAINT PKEmployee PRIMARY KEY(EmpId));
CREATE TABLE Orders(
OrderId CHAR(11) NOT NULL,
OrderDate VARCHAR(50) NOT NULL,
CusId CHAR(11) NOT NULL,
MotorId CHAR(11) NOT NULL,
EmpId CHAR(11) NOT NULL,
CONSTRAINT PKOrders PRIMARY KEY(OrderId),
CONSTRAINT FKCusId FOREIGN KEY(CusId)
REFERENCES Customer (CusId)
ON DELETE SET NULL
ON UPDATE CASCADE,
CONSTRAINT FKMotorId FOREIGN KEY(MotorId)
REFERENCES Motorcycle (MotorId)
ON DELETE SET NULL
ON UPDATE CASCADE,
CONSTRAINT FKEmpId FOREIGN KEY(EmpId)
REFERENCES Employee (EmpId)
ON DELETE SET NULL
ON UPDATE CASCADE);
CREATE TABLE Supplier(
SuppId CHAR(11) NOT NULL,
SuppName VARCHAR(50) NOT NULL,
SuppPhoneNumber VARCHAR(30) NOT NULL,
CONSTRAINT PKSupplier PRIMARY KEY(SuppId));
CREATE TABLE Shipping(
CompId CHAR(11) NOT NULL,
CompRate DECIMAL(10,2),
CompShipMode VARCHAR(50) NOT NULL,
CONSTRAINT PKShipping PRIMARY KEY(CompId));
CREATE TABLE OrderPart(
OrderPartId CHAR(11) NOT NULL,
OrderQuantity INTEGER NOT NULL,
PartId CHAR(11) NOT NULL,
OrderId CHAR(11) NOT NULL,
CONSTRAINT PKOrderPart PRIMARY KEY(OrderPartId),
CONSTRAINT FKPartId FOREIGN KEY(PartId)
REFERENCES Parts (PartId)
ON DELETE SET NULL
ON UPDATE CASCADE,
CONSTRAINT FKOrderId FOREIGN KEY(OrderId)
REFERENCES Orders (OrderId)
ON DELETE SET NULL
ON UPDATE CASCADE);
CREATE TABLE Parts(
PartId CHAR(11) NOT NULL,
PartName VARCHAR(50) NOT NULL,
PartCost DECIMAL(10,2),
Brand VARCHAR(20),
CONSTRAINT PKParts PRIMARY KEY(PartId),
CONSTRAINT FKMotorId FOREIGN KEY(Brand)
REFERENCES Motorcycle (MotorMake)
ON DELETE SET NULL
ON UPDATE CASCADE);
The production phase program will be used by regular users at FRED (as opposed to IT staffers). FRED has determined that most customer inquiries come to the business over the telephone (however, we can see that we should easily be able to adapt our software to be web-enabled in the future). Therefore, we want a Java application that will allow our customer service users to provide quotes in a timely manner. Therefore, we will build a “rate quote” GUI. The system will first allow us to select a customer (assume they are already in the DB), an employee giving the quote, and then select part(s) and/or motorcycles. You system should also include the shipping information in the quote. After all of the items have been selected for the rate quote, we should give the user a “bottom line” total that includes shipping (we won’t worry about sales tax in this system). We’d like a hard copy of this quote for future reference. Therefore, you should format the output neatly in the jGrasp System.out.println area for ease of reference (we can then print it later). The output should include the current date, customer, employee and product information as well as the computed total for this quote. Note that we are not updating the database in any way with this system. Later FRED may decide to pay us more money to convert these rate quotes into actual invoices, but we can’t get that into the current release (translation: not this semester!). In a commercial application, we would be concerned about these transactions being atomic (e.g., we would not want to have two users promising the same motorcycle to two customers). However, we will not worry about this detail for this prototype. Nonetheless it is instructive to consider all aspects of what we’ve learned so that we are aware of the limitations of our system. Other aspects that we won’t concern ourselves with are: concurrency, backup, recovery, and security.
As reference The production phase program will be used by regular users at FRED (as opposed to IT staffers). FRED has determined that most customer inquiries come to the business over the telephone (however, we can see that we should easily be able to adapt our software to be web-enabled in the future). Therefore, we want a Java application that will allow our customer service users to provide quotes in a timely manner. Therefore, we will build a “rate quote” GUI. The system will first allow us to select a customer (assume they are already in the DB), an employee giving the quote, and then select part(s) and/or motorcycles. You system should also include the shipping information in the quote. After all of the items have been selected for the rate quote, we should give the user a “bottom line” total that includes shipping (we won’t worry about sales tax in this system). We’d like a hard copy of this quote for future reference. Therefore, you should format the output neatly in the jGrasp System.out.println area for ease of reference (we can then print it later). The output should include the current date, customer, employee and product information as well as the computed total for this quote. Note that we are not updating the database in any way with this system. Later FRED may decide to pay us more money to convert these rate quotes into actual invoices, but we can’t get that into the current release (translation: not this semester!). In a commercial application, we would be concerned about these transactions being atomic (e.g., we would not want to have two users promising the same motorcycle to two customers). However, we will not worry about this detail for this prototype. Nonetheless it is instructive to consider all aspects of what we’ve learned so that we are aware of the limitations of our system. Other aspects that we won’t concern ourselves with are: concurrency, backup, recovery, and security.
As reference CREATE TABLE Customer(
CusId CHAR(11) NOT NULL,
CusFirstName VARCHAR(50) NOT NULL,
CusLastName VARCHAR(50) NOT NULL,
CusCity VARCHAR(50) NOT NULL,
CusState CHAR(2) NOT NULL,
CusZip CHAR(10) NOT NULL,
CusPhoneNumber VARCHAR(30) NOT NULL,
CONSTRAINT PKCustomer PRIMARY KEY(CusId));
CREATE TABLE Motorcycle(
MotorId CHAR(11) NOT NULL,
MotorMake VARCHAR(50) NOT NULL,
MotorModel VARCHAR(20) NOT NULL,
MotorStatus VARCHAR(10) NOT NULL,
MotorYear INTEGER NOT NULL,
CONSTRAINT PKMotorcycle PRIMARY KEY(MotorId));
CREATE TABLE Employee(
EmpId CHAR(11) NOT NULL,
EmpType VARCHAR(20) NOT NULL,
EmpSalary DECIMAL(10,2),
CONSTRAINT PKEmployee PRIMARY KEY(EmpId));
CREATE TABLE Orders(
OrderId CHAR(11) NOT NULL,
OrderDate VARCHAR(50) NOT NULL,
CusId CHAR(11) NOT NULL,
MotorId CHAR(11) NOT NULL,
EmpId CHAR(11) NOT NULL,
CONSTRAINT PKOrders PRIMARY KEY(OrderId),
CONSTRAINT FKCusId FOREIGN KEY(CusId)
REFERENCES Customer (CusId)
ON DELETE SET NULL
ON UPDATE CASCADE,
CONSTRAINT FKMotorId FOREIGN KEY(MotorId)
REFERENCES Motorcycle (MotorId)
ON DELETE SET NULL
ON UPDATE CASCADE,
CONSTRAINT FKEmpId FOREIGN KEY(EmpId)
REFERENCES Employee (EmpId)
ON DELETE SET NULL
ON UPDATE CASCADE);
CREATE TABLE Supplier(
SuppId CHAR(11) NOT NULL,
SuppName VARCHAR(50) NOT NULL,
SuppPhoneNumber VARCHAR(30) NOT NULL,
CONSTRAINT PKSupplier PRIMARY KEY(SuppId));
CREATE TABLE Shipping(
CompId CHAR(11) NOT NULL,
CompRate DECIMAL(10,2),
CompShipMode VARCHAR(50) NOT NULL,
CONSTRAINT PKShipping PRIMARY KEY(CompId));
CREATE TABLE OrderPart(
OrderPartId CHAR(11) NOT NULL,
OrderQuantity INTEGER NOT NULL,
PartId CHAR(11) NOT NULL,
OrderId CHAR(11) NOT NULL,
CONSTRAINT PKOrderPart PRIMARY KEY(OrderPartId),
CONSTRAINT FKPartId FOREIGN KEY(PartId)
REFERENCES Parts (PartId)
ON DELETE SET NULL
ON UPDATE CASCADE,
CONSTRAINT FKOrderId FOREIGN KEY(OrderId)
REFERENCES Orders (OrderId)
ON DELETE SET NULL
ON UPDATE CASCADE);
CREATE TABLE Parts(
PartId CHAR(11) NOT NULL,
PartName VARCHAR(50) NOT NULL,
PartCost DECIMAL(10,2),
Brand VARCHAR(20),
CONSTRAINT PKParts PRIMARY KEY(PartId),
CONSTRAINT FKMotorId FOREIGN KEY(Brand)
REFERENCES Motorcycle (MotorMake)
ON DELETE SET NULL
ON UPDATE CASCADE);
Explanation / Answer
Ans;
1.
SELECT EmpId
FROM Employee
ORDER BY EmpSalary
2.
SELECT Customer.CusFirstName
FROM Customer
INNER JOIN Orders ON (Orders.CusId = Customer.CusId)
INNER JOIN OrderPart ON (OrderPart.OrderId = Orders.OrderId)
INNER JOIN Parts ON (Parts.PartId = OrderPart.PartId)
INNER JOIN Supplier ON (Supplier.SuppId = Parts.SuppId)
WHERE Parts.PartName = 'x' AND Supplier.SuppName = 'y'
3.
SELECT Shipping.CompRate
FROM Parts
INNER JOIN OrderPart ON (OrderPart.PartId = Parts.PartId)
INNER JOIN Orders ON (Orders.OrderId = OrderPart.OrderId)
INNER JOIN Shipping ON (Shipping.CompId = Orders.CompId)
WHERE Parts.PartName = 'x'
4.
What all details do you want. Please specify, there are many columns
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.