You are on page 1of 7

TUNIS BUSINESS SCHOOL

UNIVERSITY OF TUNIS

University year Exams


2015/2016 2016/2015

Web Development (CS220)


Midterm Exam

Bachelor degree . Group ..

Name ... Student ID

Reminders

Time: 60 minutes (1 hour)

During this exam you are authorized to use only the website: www.w3schools.com. All use
of any other website will result to a disqualification from the exam. However, you are not
allowed to access to your emails during the conduct of the exam or use your notebook
computers, calculators, cell phones, etc.

You are not authorized to open files that are already on the workstation you are using or that
are downloaded from the internet. You should only have blank tabs on Notepad++ the first
time you open it during the exam.

These instructions and images needed for this exam are placed in a ZIP file named
CS220_midterm2016_2.zip that you can download from the following
URL:http://tinyurl.com/jsnybgb

All the files and folders created during the exam have to be placed
in C:\xampp\htdocs\your_group\your_name; Under the created directory your_name,
create two directories named modules containing your .html, .css and .js files and
images containing the inserted images.

Do not get bogged down in a single question; allow time to attempt every question. A partial
answer is better than no answer.

At the end of the exam, you have to:

Send your work by email to your professor before the end of the exam session, even if it is
not achieved.
Put webdev_your group_and your name as a subject of your e-mail.
Do not forget to attach your .html, .css and .js files to your e-mail. It is your
responsibility to ensure all files are correctly sent.

1/7
TUNIS BUSINESS SCHOOL
UNIVERSITY OF TUNIS

Exercise 1:

1. Design an HTML page named midterm.html. Write the necessary code to make your page
(midterm.html) look like the page below:

- Your main page midterm.html must include 2 pages (head.html and solar.html) using
frames.

- The necessary images can be found inside the ZIP file downloadable from the URL:
http://tinyurl.com/jsnybgb. They must be copied in your images directory. The image of the
first frame head.html must be inserted from
http://www.seanhelvey.com/wp-content/uploads/2014/08/html5-css-javascript-logos.png

- The second page solar.html must present two rows (using a table): The first row presents a
table of content that refers to the content of the second row (using lists).

- You must follow the hierarchy of sections presented in the table of content to make the
levels of headings in the right column.

- You must create a button in the section Calculate planet perimeter named Calculate to
calculate the planet perimeter(p) from the radius:

o Using a javascript code, when you click on the button Calculate a dialog window
should be displayed to enter the radius (r) of the planet. Then, the planet perimeter
should be calculated as follows (perimeter=*r*r). The result is to be displayed in an
alert window.

- Finally, the external links Solar System Exploration and NASA/JPL Solar System main
page must refer to the http://solarsystem.nasa.gov/ and http://solarsystem.nasa.gov/planets/
links.

2/7
TUNIS BUSINESS SCHOOL
UNIVERSITY OF TUNIS

2. The content of the solar.html page is to be copied from the following text:

Table of Content
1. Solar System
1. Discovery and exploration
2. Structure and composition
3. Inner Solar System
1. Inner planets
1. Mercury
2. Venus
3. Earth
4. Mars
4. Outer Solar System
5. Calculate planet perimeter
6. External links

3/7
TUNIS BUSINESS SCHOOL
UNIVERSITY OF TUNIS

Solar System
The Solar System is the gravitationally bound system comprising the Sun and the objects that orbit it, either
directly or indirectly. Of those objects that orbit the Sun directly, the largest eight are the planets, with the
remainder being significantly smaller objects, such as dwarf planets and small Solar System bodies. Of the
objects that orbit the Sun indirectly, the moons, two are larger than the smallest planet, Mercury.

Discovery and exploration


For many thousands of years, humanity, with a few exceptions, did not recognize or understand the concept
of the Solar System. Most people up to the Late Middle AgesRenaissance believed Earth to be stationary at
the centre of the universe and categorically different from the divine or ethereal objects that moved through
the sky. Although the Greek philosopher Aristarchus of Samos had speculated on a heliocentric reordering
of the cosmos, Nicolaus Copernicus was the first to develop a mathematically predictive heliocentric
system. In the 17th century, Galileo Galilei, Johannes Kepler, and Isaac Newton developed an
understanding of physics that led to the gradual acceptance of the idea that Earth moves around the Sun and
that the planets are governed by the same physical laws that governed Earth. The invention of the telescope
led to the discovery of further planets and moons. Improvements in the telescope and the use of unmanned
spacecraft have enabled the investigation of geological phenomena, such as mountains, craters, seasonal
meteorological phenomena, such as clouds, dust storms and ice caps on the other planets.

Structure and composition


The principal component of the Solar System is the Sun, a G2 main-sequence star that contains 99.86% of
the system's known mass and dominates it gravitationally. The Sun's four largest orbiting bodies, the giant
planets, account for 99% of the remaining mass, with Jupiter and Saturn together comprising more than
90%. The remaining objects of the Solar System (including the four terrestrial planets, the dwarf planets,
moons, asteroids, and comets) together comprise less than 0.002% of the Solar System's total mass.

Most large objects in orbit around the Sun lie near the plane of Earth's orbit, known as the ecliptic. The
planets are very close to the ecliptic, whereas comets and Kuiper belt objects are frequently at significantly
greater angles to it. All the planets and most other objects orbit the Sun in the same direction that the Sun is
rotating (counter-clockwise, as viewed from above Earth's north pole). There are exceptions, such as
Halley's Comet.

The overall structure of the charted regions of the Solar System consists of the Sun, four relatively small
inner planets surrounded by a belt of mostly rocky asteroids, and four giant planets surrounded by the
Kuiper belt of mostly icy objects. Astronomers sometimes informally divide this structure into separate
regions. The inner Solar System includes the four terrestrial planets and the asteroid belt. The outer Solar
System is beyond the asteroids, including the four giant planets. Since the discovery of the Kuiper belt, the
outermost parts of the Solar System are considered a distinct region consisting of the objects beyond
Neptune.

4/7
TUNIS BUSINESS SCHOOL
UNIVERSITY OF TUNIS

Inner Solar System


Inner planets

Mercury
Mercury (0.4 AU from the Sun) is the closest planet to the Sun and the smallest planet in the Solar System
(0.055 Earth masses). Mercury has no natural satellites; besides impact craters, its only known geological
features are lobed ridges or rupes that were probably produced by a period of contraction early in its history.
Mercury's very tenuous atmosphere consists of atoms blasted off its surface by the solar wind. Its relatively
large iron core and thin mantle have not yet been adequately explained. Hypotheses include that its outer
layers were stripped off by a giant impact; or, that it was prevented from fully accreting by the young Sun's
energy.

Venus
Venus (0.7 AU from the Sun) is close in size to Earth (0.815 Earth masses) and, like Earth, has a thick
silicate mantle around an iron core, a substantial atmosphere, and evidence of internal geological activity. It
is much drier than Earth, and its atmosphere is ninety times as dense. It is the hottest planet, with surface
temperatures over 400 C (752F), most likely due to the amount of greenhouse gases in the atmosphere. No
definitive evidence of current geological activity has been detected on Venus, but it has no magnetic field
that would prevent depletion of its substantial atmosphere, which suggests that its atmosphere is being
replenished by volcanic eruptions.

Earth

Earth (1 AU from the Sun) is the largest and densest of the inner planets, the only one known to have
current geological activity, and the only place where life is known to exist. Earth's atmosphere is radically
different from those of the other planets, having been altered by the presence of life to contain 21% free
oxygen. It has one natural satellite, the Moon, the only large satellite of a terrestrial planet in the Solar
System.

Mars
Mars (1.5 AU from the Sun) is smaller than Earth and Venus (0.107 Earth masses). It possesses an
atmosphere of mostly carbon dioxide with a surface pressure of 6.1 millibars (roughly 0.6% of that of
Earth). Its surface, peppered with vast volcanoes, such as Olympus Mons, and rift valleys, such as Valles
Marineris, shows geological activity that may have persisted until as recently as 2 million years ago. Its red
colour comes from iron oxide (rust) in its soil. Mars has two tiny natural satellites (Deimos and Phobos)
thought to be captured asteroids.

5/7
TUNIS BUSINESS SCHOOL
UNIVERSITY OF TUNIS

Outer Solar System

Calculate planet perimeter

External links
Solar System Exploration
NASA/JPL Solar System main page

Exercise 2:
1. Add a CSS style sheet to your html page solar.html to improve the appearance of your
web page: Add an external CSS file named style.css to include the following properties:

- A dashed black border and a light grey background to the first row.
- A font size equal to 30px to the title Table of Content
- Counters for headings to the second row. The first counter must be in upper-roman.
- All headings must be in dark blue.
- The used font for all the paragraphs must be in Times New Roman and justified.
- The third paragraph in section Structure and composition must be in italic with a pink
background.
- The elements of the table Outer Solar System must be centered with blue color.
- Add a margin of 18px to your page; Add a space of 25px between first row border and the
second row content.
- The list item markers of External links section must be disc.

6/7
TUNIS BUSINESS SCHOOL
UNIVERSITY OF TUNIS

Your CSS code should give the following result once applied:

7/7

You might also like