Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Chapter 1 - Challenge #3 - Training Workshops

Your company likes to present training workshops that help people in the information technology industry improve their skills. Your task is to write and object-oriented application that will let the company display and edit workshops.

There are several workshop categories: (1) application development, (2) databases, (3) networking, and (4) systems administration. You will create an enumerated type that matches these categories. A workshop consists of: (1) title, (2) length in days, (3) category, and (4) cost. Create a Class named Workshop that holds this information, with a complete set of properties and ToString method. It should also contain a public shared string array such as the following:

Public Shared CategoryNames ( ) As String = {"Application development" , "Databases" ,
"Networking" , "System Administration" }

Data File

When the application starts, it must read a list of workshops from a data file and store them in an array or collection. Each line in the file will be a different workshop, with the fields separated by the \ or , (backslash or comma) character. Here is a sample line from the file:

0\3\800\Programming in Java or 0,3,800,Programming in Java
(Category = 0, Days = 3, Cost = $800, Title = Programming in Java)

Create a user interface that lets the user complete the following tasks:

1. Display all workshops in a list in the startup form, as shown in Figure 1-21.

2. Select a single workshop to display in detail format in a separate window, as shown in

Figure 1-22. A combo box control should display a list of categories, with the workshop's actual category as the current selection. This window permits the user to modify the workshop fields and save all changes. If the user modifies a workshop, clicks the Save and Close button, and returns to the startup form, the workshop changes should appear in the list box.

** None of the changes are permanent because you are not required to save the modified workshop list back to the data file.

230_Fig.jpg

Implementation Suggestions

You can create a property of type Workshop in the Workshop Detailsform. Before displaying this form, assign the selected workshop (from the list box) to the Workshop Details form's Text property. When the form loads, copy the workshop property values into the text boxes and combo box.

Chapter 5 - Challenge #5 - Training Workshops

Use the Programming Challenge 3 from Chapter 1 as a starting point for this challenge.

This version is a 3-tier application.

1. Add an ID property to the Workshop class.

2. Create a database to replace the data file that was used for input in Chapter 1. In it, create a database table named Workshops that contains the workshop ID, category ID, number of days, cost of the workshop, and workshop title. Also in the database, create a Categories table that contains category ID and category description columns.

3. Create a DataSet containing table adapters based on the two database tables. In addition, create a TableAdapter That joins the two tables and contains the workshop ID, workshop category name, number of days, cost, and workshop description.

4. The Workshop class represents the middle tier. In this class, declare an instance of the TableAdaper class so you can call the TableAdapter method. Provide properties and methods in the Workshop class that are called by your MainForm and DetailsForm classes

5. Display the list of workshops in a DataGridView control, as shown in Figure 5-32. When the user selects a workshop in the grid, display the Workshop Details form, as shown in Figure 5-33. The combo box is filled from the Categories TableAdapter. The user must be able to modify a workshop in this window and save his or her changes. When the details form closes, the grid must be refreshed, so the user can see the changes he or she made. Additionally, the changes must be saved back to the database as well.

2032_Fig1.jpg

Java, Programming

  • Category:- Java
  • Reference No.:- M91954991

Have any Question?


Related Questions in Java

Assignment - method in our madnessthe emphasis for this

Assignment - "Method in our Madness" The emphasis for this assignment is methods with parameters. In preparation for this assignment, create a folder called Assign_3 for the DrJava projects for the assignment. A Cityscap ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Assignment - java program using array of objectsobjectives

Assignment - JAVA Program using array of objects Objectives - This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details - For this assignment, you are required to develop a Menu ...

Operating systems assignment -problem 1 sharing the bridgea

Operating Systems Assignment - Problem 1: Sharing the Bridge A new single lane bridge is constructed to connect the North Island of New Zealand to the South Island of New Zealand. Farmers from each island use the bridge ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Can someone help me please with those question1what is the

Can someone help me please with those question 1:what is the best data type for student id datatime,currency,number,decimal 2:which relationshipis preferable? one to one,one to many,many to many 3:if you add table A's pr ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Applied software engineering assignment 1 -learning

Applied Software Engineering Assignment 1 - Learning outcomes - 1. Understand the notion of software engineering and why it is important. 2. Analyse the risk factors associated with phases of the software development lif ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As