Richfield IT: Java Application for Koch's Cottages, 2nd Sem Assignment

Verified

Added on  2019/09/22

|3
|667
|456
Homework Assignment
AI Summary
This assignment solution addresses a Java programming problem for Richfield Graduate Institute of Technology. The first part involves creating a Java application (JCottageFrame.java) for Koch's Cottages, a weekend getaway resort. The application calculates vacation prices based on cottage and boat rentals, incorporating mutually exclusive checkboxes and labels for user interaction. The second part requires the creation of a MySQL database named MyCustomers with Customers and Orders tables, including appropriate data types and primary/foreign keys. The solution includes database design output and sample records. A Java program is then developed to establish a JDBC connection to the MyCustomers database, retrieve and display data from both tables using Swing components (TextArea), and implement menu items or command buttons for data retrieval. Finally, a servlet program is written to search for a customer in the database, adding new customer details if not found and displaying appropriate messages based on the search results. The assignment emphasizes database interaction, GUI design, and servlet development within a Java environment.
Document Page
NB: 1. Candidates are advised to read the guide lines.
2. For reference use prescribed, recommended books and other source you may come
across.
3. Correct referencing carries 10 Marks.
GUIDELNES
The purpose of an assignment is to ensure that the Learner is able to:
Use methods of enquiry and research in a disciplined field.
Interpret and evaluate text.
Have a sound understanding of key principles and theories, rules and awareness.
Solve unfamiliar problems using correct procedures as well as investigate and critically
analyse information and report thereof.
Present and communicate information reliably and coherently.
Instructions and guidelines for writing assignments
1. Use the correct cover page provided by the institution.
2. All essay type assignments must include the following:
2.1 Table of contents
2.2 Introduction
2.3 Main body with subheadings
2.4 Conclusions and recommendations
2.5 Bibliography
3. The length of the entire assignment must have minimum of 5 pages. Preferably typed with font
size 12
3.1 The quality of work submitted is more important than the number of assigned pages.
4. Copying is a serious offence which attracts a severe penalty and must be avoided at all costs. If
any learner transgresses this rule, the lecturer will retain the assignments and ask the affected
learners to resubmit a new assignment which will be capped at 50%.
5. Use the Harvard referencing method.
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
RICHFIELD GRADUATE INSTITUTE OF TECHNOLOGY
(PTY) LTD
FACULTY OF INFORMATION TECHNOLOGY
PROGRAMMING 732 java
2ND SEMESTER ASSIGNMENT
Name & Surname: _________________________________ ICAS No: _________________
Qualification: ______________________ Semester: _____ Module Name: __________________________
Date Submitted: ___________
ASSESSMENT CRITERIA MARK
ALLOCATION
EXAMINER
MARKS
MODERATOR
MARKS
MARKS FOR CONTENT
QUESTION ONE 30
QUESTION TWO 40
QUESTION THREE 30
TOTAL MARKS 100
MARKS FOR TECHNICAL ASPECTS
1. TABLE OF CONTENTS
2. LAYOUT AND SPELLING
3. REFERENCE
TOTAL MARKS
TOTAL MARKS FOR ASSIGNMENT 100
Examiner’s Comments:
Moderator’s Comments:
Signature of Examiner: Signature of Moderator:
Document Page
QUESTIONS
[100 MARKS]
QUESTIONS ONE [30 MARKS]
1.1. Create an application for Koch’s Cottages, a weekend getaway resort that rents
Cottages and boats to use on the local lake. The application allows users to compute
The price of their vacations. Include mutually exclusive check boxes to select a one
bedroom Cottage at $600 per week or a two-bedroom cottage at $850 per week. The
user also can choose a rowboat rental at $60 per week. Include labels as appropriate
to explain the application’s functionality. Save the file as JCottageFrame.java.
QUESTIONS TWO [40 MARKS]
2.1 Create a database named MyCustomers, with the following tables using MySQL. Use
the appropriate data types and note that the underlined fields denotes a field to be
either a primary key or a foreign key
Customers (CustomerID, Name, Address, City)
Orders (OrderID, CustomerID, Amount, Date)
Insert at least 5 records in each of the tables appropriately. Include the output for
your database design and the records for your tables.
2.2 Write a Java program to establish a connection to the MyCustomers database using
the JDBC driver to retrieve the entire Customers and Orders table. Use the Swing
component TextArea to display the data and your interface must use either menu
items or command buttons to trigger the actions for retrieving the data.
QUESTIONS THREE [30 MARKS]
3.1 Write a servlet program that searches for a customer in the database you designed in
Question 3 above. If the customer is not in the database, add the customer details to
the database and display the message “Customer is added to the database”. If the
customer is in the database, display the message “Already Existing Customer”
chevron_up_icon
1 out of 3
circle_padding
hide_on_mobile
zoom_out_icon