Advertisement

Assignment No. 01 Semester: Fall 2009 CS201: Introduction to Programming

Assignment No. 01
Semester: Fall 2009

CS201: Introduction to Programming

Total Marks: 20

Due Date:22/10/2009

Instructions

Please read the following instructions carefully before submitting assignment:

It should be clear that your assignment will not get any credit if:

§ The assignment is submitted after due date.

§ The submitted assignment does not open or file is corrupt.

§ All types of plagiarism are strictly prohibited.

Note: You have to upload only .cpp file. Assignment in any other format (extension) will not be accepted. If you will submit code in .doc (Word document) you will get zero marks.

Objective

The objective of this assignment is to provide hands on experience of using

§ Basic concepts of C++ language and Programming

§ Conditional statements of C language

§ Function in c language

§ Writing and editing a C program

§ Saving a C program

§ Compiling a C program

§ Executing the program

Guidelines

§ Code should be properly aligned and well commented.

§ Follow c/c++ rules while writing variables names, function names etc

§ Use only dev-C++ for this assignment.

§ Use appropriate c/c++ structure i.e. if-else, switch statement etc to get inputs from user.(Marks will be deducted if inappropriate structure will be used).

Assignment

Problem Statement: Movie Rental Store

You are required to write a program for Movie Rental Store. The basic idea is that user/reader will provide customer information, movie name, and number of days. Upon this information your program will calculate the charged amount for that movie.

Detailed Description:

1. The program should display

Please provide customer Name:

Please provide Movie Description.

Enter ‘R’ for Regular Movie.

Enter ‘C’ for children Movie.

Enter ‘N’ for New Released Movie.

Enter ‘E’ for English Movie.

Then your program should take these inputs,

2. Depending upon the choices that user has entered, your program will further display the prompt

3. If user has entered Movie description, then your program should prompt the user to enter the Movie Name and Number of days.

-----------------------------------------------------------------

Movie Name :

Number of day’s:

-----------------------------------------------------------------

4. After getting all this information, now write a function which will calculate rental/charged amount on the basis of this information.

To calculate rental/charged amount we will use this formula:

Rental amount = charged amount * number of days

Charged amount will be different for different movies according to following description:

Regular Movie: 40 RS

Children Movie: 30 RS

English Movie: 50 RS

New release: 100 RS

After calculating charged amount for this movie and display it on the screen.

Sample Output

Please provide customer Name: Aftab

Please provide Movie Description:

Enter ‘R’ for Regular Movie:

Enter ‘C’ for children Movie:

Enter ‘N’ for New Released Movie:

Enter ‘E’ for English Movie:

R

Please provide following information:

Movie Name : Jinnah

Number of day’s: 3

Final output:

-----------------------------------------------------------------

Customer Name: Aftab

Movie Type : Regular

Movie Name : Jinah

Number of day’s: 3

Your Rental Amount is: 120 Rs

-----------------------------------------------------------------

Deadline

Your assignment must be uploaded/submitted on or before October 22, 2009

Course Code: CS614 Fall 2009

Assignment No. 01

Deadline date:

Your assignment must be uploaded/submitted before or on October 23, 2009.

Assignment Marks: 20

Assignment Topic:

Topics covered in this assignment are basic data warehouse concepts.

Uploading instructions

Please view the assignment submission process document provided to you by the Virtual University to upload the assignment.

Rules for Marking

It should be clear that your assignment will not get any credit if:

o The assignment is submitted after due date

o The assignment is copied

Objective

  • To learn and understand basic data warehouse concepts.

Problems

Q No. 1 [5]

Give at least four reasons why we De-Normalize the database.

Q No. 2 [5]

If de-normalization improves data warehouse processes, why fact table is in normal form?

Q No. 3 [5]

Is OLTP database design optimal for Data Warehouse?

Q No. 4 [5]

Why data warehouse and transaction databases need to be different.