JAVA Project Doha Appliances Repairs (DAR) Description Doha Appliances Repairs (
ID: 3576300 • Letter: J
Question
JAVA Project
Doha Appliances Repairs (DAR) Description Doha Appliances Repairs (DAR) is a repairs shop that serves its customers by providing maintenance services to their electronic appliances such as TVs, radios, washing machines, DVD players, playStations, etc. DAR keeps manual records of its customers' data, their appliances and related services. This manual process is getting tedious as their customers base is becoming large. DAR believes that if they make a computerized information system, they can serve their customers far better than their competitors do. Sothey decided to use object-oriented technology to build a user-friendly system that can handle all I/O operations, save records permanently, and produce different reports when needed You are required to help DAR by building the system for managing their operations. The systems should keep track of customers, devices, spare parts, suppliers of parts, technicians (and their specialties), and details of the repair services they provide. On arrival at the reception desk the customer will provide the receptionist (a technician) with details about the appliance and the required service, which is going to be filled in a job card with a brief description of the reported problem and results of the quick inspection by the receptionist. If the appliance is brought for the first time a unique serial number is assigned to the appliance and printed on a sticker which is fixed on the top of the appliance. If the appliance already has a serial number it is noted and recorded in the job card. The system should be able to keep records of the job cards and the related services. An estimate date for finishing the repair service is recorded, and ifthe appliance is repaired before that date the customer is contacted in order to come and collect the appliance. The job card also contains details of the customer. When an appliance is repaired, a description of what was done is recorded in the system. Also the details of the replaced parts and their cost is recorded, as well as the amount of labor cost for the job. The name of the technician who performed the repair is also recorded as part of the service record. Customers may contact DAR any time to follow-up the service progress and the system should help the technician to give the customer accurate feedback about the job statusExplanation / Answer
<html>
<style>
h3 {color:bootlegreen;font:700 12pt arial}
body {font:10pt verdana}
td{font:10pt verdana}
a {font:700 12pt verdana;color:green}
h2 {font:700 16pt arial;color:bootlegreen}
</style>
<body bgcolor="beige" leftmargin=0
topmargin=0>
<div>Online Book Store </div>
<table width=100% height=100%>
<tr>
<td width=20% valign=top>
<form action="login.jsp" method="post">
<h3>Login </h3>
Username
<br>
<input type=text name=uname size=20>
<br>
Password
<br>
<input type=password name=pwd size=20>
<p>
<input type=submit value="Submit">
<p>
<a href="register.html">I Am New User</a>
</form>
</td>
<td valign=top>
<h3>Introduction</h3>
This site allows you to purchase books online. All that you have to do is add selected books to shopping cart and finalize the order. Books selected by you will be delivered to your door steps. You can pay only after books are delivered.
<p>
<b>The following are the required steps :</b>
<ul>
<li>Login if already registered. Otherwise register as a user. Registration is free.
<li>Browser books and add books to shopping cart. Browsing is allowed to everyone, but only registed users can place order.
<li>You can modify shopping cart at your will
<li>Finalize the order.
<li>Pay for books when they are deliverd to your door steps.
</ul>
<p>
<center>
<a href="browsebooks.jsp">Browse Available Books </a>
<p>
<img src="image.gif">
</center>
</tr>
</table>
</body>
</html>
<html>
<style>
h2{color:bottlegreen;font:700 20pt arial}
h4 {color:brwon;font:700 11pt verdana}
td {font:10pt verdana}
a {font:10pt verdana;color:navy}
</style>
<body bgcolor="beige">
<h2>New User Registration </h2>
<hr>
<form action="register.jsp" method="post">
<table>
<tr>
<td>
User Name
<td>
<input type=text name=uname size=20>*
</tr>
<tr>
<td>
Password
<td>
<input type=password name=pwd size=20>*
</tr>
<tr>
<td>
Confirm Password
<td>
<input type=password name=pwd2 size=20>*
</tr>
<tr>
<td>
Email Address
<td>
<input type=text name=email size=30>*
</tr>
<tr>
<td>Mailing Address
<td>
<textarea name="address" rows=3 cols=30></textarea>*
</td>
</tr>
<tr>
<td>
Phone Number
<td>
<input type=text name=phone size=30>
</tr>
</table>
<p>
<input type=submit value="Register">
<input type=reset value="Clear All">
<p>
<a href="login.html">Go Back</a>
</form>
</center>
</body>
</html>
<jsp:useBean id="user" scope="session" class="obs.User" />
<jsp:useBean id="cart" scope="session" class="obs.Cart" />
<%@ page import="java.util.*"%>
<style>
td {font:10pt verdana}
th {font:700 10pt verdana}
h2 {font:700 16pt arial}
a {font:700 10pt verdana;color:darkgreen}
</style>
<%
String act = request.getParameter("act");
if ( act != null )
{
if( act.equals("Finalize Order"))
{
String orderid;
orderid = cart.finalizeOrder( user.getUserid());
if ( orderid == null)
{
out.println("Sorry! Order Cannot be finalized.");
return;
}
else
{
out.println("Order Has Been Finalized. Order id : " + orderid );
out.println("<a href=home.jsp>Continue...</a>");
cart.clearAll();
return;
}
}
if ( act.equals("remove"))
{
cart.removeItem( request.getParameter("isbn"));
}
else
if ( act.equals("Update Cart"))
{
String isbn[] = (String []) request.getParameterValues("isbn");
String qty[] = (String []) request.getParameterValues("qty");
for (int i = 0 ;i < isbn.length ;i ++)
cart.updateQty(isbn[i], Integer.parseInt( qty[i]));
}
else
if ( act.equals("Clear Cart"))
cart.clearAll();
} // end of outer if
%>
<html>
<body bgcolor="beige">
<table border=1 border=1 width=100%>
<tr>
<td>
Welcome <b><jsp:getProperty name="user" property="uname"/> </b>
</tr>
<tr>
<td>
<h2>Shopping Cart </h2>
<table width=100%>
<tr>
<td width=70%>
<form action="home.jsp" method="get">
<table border=1 width="100%">
<tr>
<th>Book Title
<th>Price
<th>Quantity
<th>Amount
<th>
</tr>
<%
obs.Item item;
ArrayList items = cart.getItems();
Iterator itr = items.iterator();
int total = 0;
while ( itr.hasNext())
{
item = (obs.Item) itr.next();
total += item.getQty() * item.getPrice();
%>
<tr>
<td>
<input type=hidden value=<%=item.getIsbn()%> name=isbn>
<%= item.getTitle()%>
<td align="right"><%= item.getPrice()%>
<td align="center"><input type=text name=qty size=5 value=<%=item.getQty()%>>
<td align="right"><%=item.getQty() * item.getPrice()%>
<td align="center"><a href=home.jsp?act=remove&isbn=<%=item.getIsbn()%>>Remove</a>
</tr>
<%
}
%>
<tr>
<td colspan=5>
Total Amount : <%=total%>
</tr>
</table>
</td>
<td>
<input type=submit value="Update Cart" name="act">
<p>
<input type=submit value="Clear Cart" name="act">
<p>
<input type=submit value="Finalize Order" name="act">
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td>
[<a href="changeprofile.jsp">Change User Details</a>]
[<a href="browsebooks.jsp">Browse Books</a>]
[<a href="querybooks.jsp">Query Books</a>]
[<a href="ordershistory.jsp">Orders History</a>]
[<a href=logout.jsp> Logout </a>]
</td>
</tr>
</table>
</body>
</html>
<jsp:useBean id="cart" class="obs.Cart" scope="session" />
<jsp:useBean id="user" class="obs.User" scope="session" />
<%
// check whether user has logged in, otherwise send user to login page
if (!user.isLogged())
response.sendRedirect("login.html");
// read data about item
String ordid = request.getParameter("ordid");
boolean result = cart.cancelOrder( Integer.parseInt(ordid));
if ( result )
out.println("<h2>Order Has Been Cancelled.</h2>");
else
out.println("<h2>Order could not be cancelled.</h2>");
%>
<p>
<a href="ordershistory.jsp">Orders History </a>
<a href="home.jsp">Home Page </a>
i have more data server not accept send mail id
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.