Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

Exercise 1 - HTML and XML

ID

Name

Stars

Facilities

Address

Distance from

center (KM)

Available

1

Les Jardins du Marais

3

Internet

74 rue Amelot, Paris, 75011

2

True

2

Golden Tulip Little Palace

4

Internet Gym

Parking Restaurant

4 rue Salomon De Caus, Paris, 75003

0.1

False

3

Tilsitt Etoile

2

Restaurant

23 rue Brey, Paris, 75017

3

False

4

Hotel Saint Charles

3

Parking

6 rue de I'Esperance, Paris, 75013

1

True

Encode the hotel table in

(1) an HTML document

(2) a well-formed XML document

Exercise 2 - DTD

(1) Create an internal DTD for the XML document above, write the whole XML document

(2) Create an external DTD for the XML document above, write the whole XML document by linking the external DTD to the XML document

Exercise 3 - XML Schema

Create an XML Schema for the above XML document, write the valid instance xml file according to this XML Schema

For Exercise 2 and 3, please consider the following facts:
- Stars is ranging from 1 to 5

- Facilities can have at least one or more of the followings: Internet, Gym, Parking, Restaurant, Pick-up;

- Distance can be empty or have one value

- Available can be either true or false.

Exercise 4 - XPath/XQuery

For the above XML document, Please write the following queries in XPath or XQuery:

(1) Select all the elements in the document

(2) Select all the hotels

(3) Select the facilities of the first before last hotel of the document

(4) Select the ID of the hotel "Tilsitt Etoile"

(5) Select all the hotels for which the distance from center is given

(6) Select the name, address and stars of the last 3 hotels

(7) Select the name and ID of the hotels with a rating higher or equal than 3

(8) Select the name of the hotels that have in a range of 1.5 KM from the center

(9) Select all the hotel names

Exercise 5 - XSLT

Taking the XML document you generated for Exercise 1, provide XSLT style sheets that:

(1) One XLST style sheet which gene rates a HTML document listing the information on a tabular form.

(2) One XLST style sheet which generates a HTML document listing the same information on a tabular form with entries sorted by name.

(3) One XLST style sheet which generates a HTML document listing the same information not on a tabular form with the names and IDs displayed in bold

Bonus: The Word Guesser

You'll create a simple word guessing game where the user gets infinite tries to guess the word (like Hangman without the hangman, or like Wheel of Fortune without the wheel and fortune).

Create two global arrays: one to hold the letters of the word (e.g. 'F', 'O', 'X'), and one to hold the current guessed letters (e.g. it would start with '_', '_', '_' and end with 'F', 'O', 'X').

Write a function called guessLetter that will:

- Take one argument, the guessed letter.

- Iterate through the word letters and see if the guessed letter is in there.

- If the guessed letter matches a word letter, changed the guessed letters array to reflect that.

- When it's done iterating, it should log the current guessed letters ('F__')

- and congratulate the user if they found a new letter.

- It should also figure out if there are any more letters that need to be guessed,

- and if not, it should congratulate the user for winning the game.

Pretend you don't know the word, and call guessLetter multiple times with various letters to check that your program works.

Bonus: Make it more like Wheel of Fortune:

- Start with a reward amount of $0

- Every time a letter is guessed, generate a random amount and reward the user if they found a letter (multiplying the reward if multiple letters found), otherwise subtract from their reward.

- When they guess the word, log their final reward amount.

Bonus: Make it like Hangman:

- Keep track of all the guessed letters (right and wrong) and only let the user guess a letter once. If they guess a letter twice, do nothing.

- Keep track of the state of the hangman as a number (starting at 0), and subtract or add to that number every time they make a wrong guess.

- Once the number reaches 6 (a reasonable number of body parts for a hangman), inform the user that they lost and show a hangman on the log.

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M92087368
  • Price:- $50

Guranteed 36 Hours Delivery, In Price:- $50

Have any Question?


Related Questions in DBMS

You can work on this assignment individually or in a group

You can work on this assignment individually or in a group of 2. If you are working in a group please establish a group in Assignment 2 Group on Canvas In this assignment you are asked to explore the use of neural networ ...

Backgrounda new training organization called abc

Background A new training organization called ABC TechTraining is opening soon and they have approached you to help design their new database. They have just completed the refurbishment of the premises and are now lookin ...

Analytic reportpurpose the purpose of this task is to

Analytic Report: Purpose: The purpose of this task is to provide students with practical experience in working in teams to write a Data Analytical report to provide useful insights, pattern and trends in the chosen/given ...

Data model development and implementationpurpose of the

Data model development and implementation Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to develop data models and map Database System into a standard development environment to gain unde ...

Suppose that you have designed a database for morgan

Suppose that you have designed a database for Morgan Importing that has the following tables: EMPLOYEE (EmployeeID, LastName, FirstName, Department, Phone, Fax, EmailAddress) STORE (StoreName, City, Country, Phone, Fax, ...

Tableau is business intelligence software that helps people

Tableau is business intelligence software that helps people see and understand their data. Fast Analytics Connect and visualize your data in minutes. Tableau is 10 to 100x faster than existing solutions. Ease of Use Anyo ...

This assignment is a continuation of this solution the case

This assignment is a continuation of this solution The case study company has received the first report from its enterprise content management (ECM) consultant and now has a documented list of major content requirements ...

Select from e d pwhere edeptddept and dcitypcity and

Select * From E, D, P WHERE E.dept=D.dept AND D.city=P.city AND D.budget>1M AND P.priority=A; Assuming relations have the same size and uniform distributions, what is the best plan with Nested Loop joins only? Write it a ...

Assignment task -write and run sql statements to complete

Assignment Task - Write and run SQL statements to complete the following tasks Part A - DML 1. Show the details of the products where the product code starts with '22'. 2. Display the vendor details from areacode 615. 3. ...

Assignmenta restaurant is designing a database to keep

Assignment A restaurant is designing a database to keep track of customer services. A customer is defined as a customer ID, name, address and a telephone number. Customers are served by employees. Each employee is define ...

  • 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