Quote:

The amount of happiness that you have depends on the amount of freedom you have in your heart

Sunday, 15 April 2012

CS410 Assignment 1 spring 2012 solution idea

CS410 Visual Programming

Assignment 1 spring 2012 solution idea.

Read the following topics:

  1. Structures:
  2. Enumeration.

Lecture 4 from the handouts of visual programming(windows programming)


Defining a structure in C++

Defining a Structure and declaring its variables in C++:

Example: Initializing a Vehicle Structure.

struct vehicle {
                            char vehicle-type [];
                            char maker        [];
                            char engine-no [];
                            char registration-no [];
                            unsigned int vehicle-price [];
                            int year-of-manufacture [];
}vahicle v1, v2, v3;


Saturday, 14 April 2012

Java Input Dialog Example

Java Input Dialog : Sample Code
Using Swing Package



import javax.swing.*;
/**
 *
 * @author Muhammad Farrukh
 */
public class InputMessage {
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        JOptionPane.showInputDialog(null, "enter something");
    }
}

Output of this code will be:



CS410 Assignment 1 Spring 2012



Assignment No.  01
Semester: SPRING 2012
CS410 – VISUAL PROGRAMMING

Total Marks: 30

Due Date:
16 / 04 / 2012

Instructions
Please read the following instructions carefully before submitting assignment:
Feel free to ask your questions related to assignment 1 via e-mail at cs410@vu.edu.pk. No MDB related to assignment is answered and blocked.

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

o        Assignment is submitted after due date.
o        Submitted assignment does not open or file is corrupt.
o        Submitted assignment file is not in required format.
o        Assignment is copied (From internet/ to from students).

Objective
To understand and revise basics of C / C++ Language.

Software (s) Used to develop Assignment
Dev C++

Assignment Submission Instructions
Ø  Assignment should be submitted in “VU-RollNo.cpp” format.
            e.g. MC123456789.cpp
Ø  You are not allowed to change given Variables Names, Types and Function Names.

Assignment

We are going to write a program of Vehicle Registration System. Follow the instructions / problem set below for assignment;
1 – There are two (2) structures in a program named as Vehicle and Owner.

2 – Variables in Vehicle structure are;
   
Structure of Vehicle

Attribute Name
Data Type
Example
vehicle-type
char
2 wheel, 3 Wheel, 4 wheel etc.
maker
char
Honda, Toyota, Suzuki etc.
year-of-manufacture
int
2012 etc
engine-no
char
BR-29536 etc.
registration-no
char
LEV-0012 etc.
vehicle-price
unsigned int
48000 etc.
3 – Variables in Owner structure are;

Structure of Owner

Attribute Name
Data Type
owner-name
char
father-name
char
address
char
date-of-purchase
int
month-of-purchase
int
year-of-purchase
int
transferred-from
char

4 – Make enumerator named as vehicle-class which has the value set given below. No vehicle is beyond these values.
  • Motor Cycle
  • Car
  • Van
  • Sports Car
  • Pickup
  • Truck

5 – vehicle-class enumerator should be in structure Vehicle.

6 – Instance / variable / object of Vehicle structure is passed in Owner structure.

7 – Initialize the variables in structures. (You may initialize them in structure / main function).

8 – When your program starts, the following lines are appeared on screen.



9 – There are three functions named as:
  • View
  • Transfer
  • Register


10 - These three functions take a single input parameter that is pointer to structure Owner. Functions have return type as void

11 – Handle the choice entered by user by Switch statement.
  • If user enters 1 then function View is triggered.
  • For option as 2, Transfer function is triggered.
  • Option 3 trigger function Register.
  • Any other input cause to terminate program.

12 – If user input is from 1 – 3 then your program, performs the required task shows result and then Clear the screen (clrscr () function is used to clear DOS screen. Function is in ‘conio’ header file) and then screen appears as in point 8, until unless users exit the program.

13 – Some Functions implementation details (functions in point 9)

Function View:
-          It displays all information stored in Owner Structure. (Vehicle information is also included in Owner Structure)
-          Sample Display Screen is provided below;



Function Transfer:
-          Sample Display Screen is provided below;



-          You have to swap Owner Name and Transferred from then take input from user for the fields as in figure above.
-          After that Clear the Screen and call View function to view all information in the structure as shown in Function View description in addition of displaying Transferred from name at the end.

Function Register:
-          You have to take input of all variables in structure except Transferred from. (Registration is used for newly buy vehicle)
-          Sample Display Screen is provided below;



Deadline:
Your assignment must be uploaded on or before 16 / 04 / 2012.



Funny Videos- Hasb-e-hall

JOption Pane-Java Swing Package

Java Swing Package usage Example:
To show a Simple Dialog in Java .

/**
 *
 * @author Muhammad Farrukh
 */
import javax.swing.*;
public class JavaDialog {
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        JOptionPane.showMessageDialog(null, "You are Visiting \n\n digicom007.blogspot.com");
        JOptionPane.showMessageDialog(null, "Thank You to visit my site");
        JOptionPane.showMessageDialog(null, "By The Owner \n Muhammad Farrukh \n BSCS\n 7th Semester\nVirtual University of Pakistan");
        System.exit(0);
    }
}

Output if this sample code will be:
First Dialog Command

2nd Dialog Command

3rd Dialog Command


Friday, 13 April 2012

MGT503 Assignment 1 Spring 2012


PRINCIPLES OF MANAGEMENT – MGT503

SPRING 2012

ASSIGNMENT NO. 1

Due date: 13-4-12

Total marks= 20 marks

Mintzberg found that managers, regardless of the type of organization or level of management, act in

specific ways when they interact with others to perform various management functions. So he

described ten (10) managerial roles – which all managers take on to be more effective.

For each of the following Functions of Managers, mention ONE managerial role (sub-role) that the

manager is assuming (2.5 marks each) to carry out the function effectively. Justify your answer with

proper reasoning (2.5 marks each).

(Refer to ‘Solution Guidelines’ given below for word limit and other guidelines)

Note:

Only in the case of Assignment, 24 Hrs extra / grace period after the due date is usually available

to overcome uploading difficulties which may be faced by the students on last date. This extra

time should only be used to meet the emergencies and above mentioned due dates should always

be treated as final to avoid any inconvenience.

Important Instructions:

Please read the following instructions carefully before attempting the assignment solution.

Deadline:

Make sure that you upload the solution file before the due date. No

assignment will be accepted through e-mail after the due date and/or once

the solution has been uploaded by the instructor.

Formatting Guidelines:

Use the font style “Times New Roman” and font size “12”.

It is advised to compose your document in MS-Word 2003 (preferably doc file

format).

Use black and blue font colors only.

Functions of Management Most Relevant

Managerial Role Reasoning

Organizing information to

develop new strategies

Meeting other department’s

manager to socialize

Controlling unexpected

environmental conditions

Bargaining with suppliers

for lower rates

Solution Guidelines:

Use APA style for referencing and citation. For guidance search “APA

reference style” in Google and read various website containing information

for better understanding or visit

http://linguistics.byu.edu/faculty/henrichsenl/apa/APA01.html

Every student will work individually and has to write in the form of an analytical

assignment.

Give the answer according to question, there will be negative marking for

irrelevant material.

Word limit for providing justification for each part is not more than 50 words

For acquiring the relevant knowledge don’t rely only on handouts but watch

the video lectures and use other reference books also.

Rules for Marking

Marking scheme: 5 marks (2.5+2.5) for each part

Please note that your assignment will not be graded or graded as Zero (0) if:

It has been submitted after due date

The file you uploaded does not open or is corrupt

It is in any format other than .doc (MS. Word)

It is cheated or copied from other students, internet, books, journals etc.


MGT301 Assignment 1 Spring 2012

SEMESTER Spring 2012
Principles of Marketing (MGT301)
Assignment No. 1
Due Date: 12 April, 2012
Marks: 20
Assignment:
Haji Abdul Kareem was the founder of Haji Group of Enterprises. He owned many textiles mills. He established his first mill in 1956. Gradually he increased the number of mills and established a group of enterprises. He had to struggle a lot; as a result he achieved his objectives and set the tremendous examples for the industry. His entrepreneurial skills managed all the activities efficiently and effectively. He was the sole proprietor and never issued a single share in open market. He had dying, stitching and other textile related units for manufacturing. He had very good supply chain management system for exports of cloths to USA, Europe and Middle East. Nationalization was very crucial era for his business but he successfully maintained his business in that era. He had four sons who were also engaged in the business and continuously worked with their father. In 2001, suddenly he died and left behind a big gap in his business. His sons had tried to manage the business as per their father’s philosophy but they had to face another dilemma which was the global recession. They had to face high production cost along with low margins. As a result, the business gradually started declining. This was a shocking point for this family who had never faced loss and such type of hurdles in the presence of their father’s management.
To face this challenge and maintain their business, For this purpose, all four brothers they had had decided to hire a consultant who could evaluate the reasons of decline and suggest them viable strategy for the future. Mr. Mohsin was a famous business consultant and they requested him for his services. In the first step, Mr. Mohsin called upon a joint meeting of the directors (all four brothers) to identify their existing capacities and areas of intensions. In a six6 hour’s session, Mr. Mohsin tried to explore the inner feelings and intentions of the directors by using different analytical techniques. When the session ended, Mr. Mohsin came up with the following results:

1. Jamal, the eldest one has more interest in production, efficiency in production, operation management and more inclined towards mass production. He wants to invest his full capacities to bring efficiency in mass production.

2. Babur, second son of Haji Abdul Kareem has concern in new product development. His interest is to focus on adding new features in the products. He is also interested to come up with new creative products rather than only relying on the existing. As he had experience in quality enhancement, he talked more about product enrichment and quality related issues. Regardless the market demand and customer’s priority, he always focuses on product and its features.

3. Tauqeer, third son of Haji Abdul Kareem has more intentions in selling the products. He tries to sale as much products as he can to every customer without even thinking that the product which he is selling to a customer might not be suitable to that customer.. He follows the selling trends in the market and is always keen to find out the potential customers for their products



CS610 Assignment 1 Spring 2012

Assignment No. 01
Semester Spring 2012
Computer Networks – CS610
Total Marks: 15
Due Date:
17 April 2012

Objective
The assignment has been designed to develop the understanding and demonstration about the concept of Trace
Route command and Basics of Network Topologies in Computer Networks.

Instructions:
Please read the following instructions carefully before solving & submitting assignment:

Assignment should be in your own wordings not copied from internet, handouts or books.

It should be clear that your assignment will not get any credit (zero marks) if:

The assignment is submitted after due date.

The submitted assignment does not open or file is corrupt.

The assignment is copied (from other student or copied from handouts or internet).

Student ID is not mentioned in the assignment file or name of file is other than student ID.

For any query about the assignment, contact at
CS610@vu.edu.pk

GOOD LUCK

Q.1. As you know that Tracer route is a network utility program to check the status of specific system on network, you are required to find the route of www.yahoo.com by using tracer route command explain all output provided by trace route command.
[10 Marks]

Q.2. You have been asked to wire a conference room with seven computers for a demonstration after a day. It needs to be done quickly and with lowest possible expenses. What network topology is best suited to this situation and why? Justify your answer with solid reasons?
[5 Marks]

Follow these steps and instructions for question 1.
First make sure that your system is connected to the internet.

Open a Windows start menu then click Run.
Start > Run. Type cmd and click OK. If you have window 7 or

vista, just go to search option in start menu and enter cmd. The command prompt will be opened. See snapshot

1.After that you can apply trace rout command.

Snapshot 1 on Next Page for Opening the CMD:


MTH501 Assignment 1 spring 2012 solution

MTH501 assignment 1 Question 3. solution.


CS401 Assignment 1 Spring 2012


Assignment No. 01
Semester: Spring 2012
CS401: Computer Architecture and Assembly Language Programming

Total Marks: 20

Due Date:16 April, 2011

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.
§  Solution is copied from any other source.

Note: You have to upload only .doc file. Assignment in any other format (extension) will not be accepted.

Objective
The objective of this assignment is to enhance your knowledge about;

§  Physical address calculation
§  Branching


Assignment


Question No. 1:

Calculate physical address of your AFD window contains CS and IP register (segment offset pairs).
Explain each and every step for calculating the physical address.         
                                                                                                                                    (Calculation:4 marks
                                                                                                                                     Explanation:3 marks
                                                                                                                                     Snapshot:3 marks )

Note: Provide snapshot of your AFD window. Please give us this type of your AFD window and mention which segment register value and offset value you have used for calculating physical address. Please see below sample snapshot.


Question No. 2:


Write a program to add these 8 numbers (15, 20, 25, 30, 35, 40, 45, and 50) with using conditional jump. Explain each instruction of program in your own words.    
                                                                                                                                                                                                                                                   
                                                                                                                                    ( Program:5 marks
                                                                                                                                      Snapshot: 5 marks )

Note: Provide snapshot of your program which will be run in AFD window. It is strictly prohibited the copied assignment.