1. You operate several BurgerStands distributed throughout town. Define a class named BurgerStand that has a member variable for the burger stand's id number and member variable for how many burgers that stand sold that day.
a) create a constructor that allows user of the class to initialize values for id number and for how many burgers sold that day and a destructor
b) create a function named justsold that show increments of the number of burgers the stand has sold by one. (This function will invoked each time the stand sells a burger so that you can track the total number of burgers sold by the stand. And returns the number of burgers sold.)
c) create a function that calculate the total number of burgers sold by all stands.
d) write in a data file, the list of burger stands and the total number of burgers sold by all stands.
Q.3. Develop an ER diagram for Salat management system (5 marks)
An analyst investigating University Student course registration system has found the following rules are applied by registration department:
All applications for course registrations received by the campus are checked by student affairs department. Student affairs first checks the pre requisite of the selected courses for each application and adds that credit to the student's fee balance. If the credit hour exceeds the limit defined for that program, student's application is rejected and is intimated to reselect the courses as per defined limit of credit hours. All such students who have selected the courses according to university policy their fee voucher is generated and that the fee voucher has been passed to the accounts manager who will contact them in the next three days. After the payment of fee, confirmation is to be sent by accounts manager through SMS. In case fee voucher is generated and is not collected by the student reminder message is sent reminding the student of the payment of fees. Construct a Decision Table for the described process.
Q.4. Answer the following as SQL queries. Also write corresponding relational algebra expression: (15 marks)
a. Number of rakats prayed as Qaza by each person
b. How many females have skipped fajar salah on 1st shawwal
c. How many salah are missed by Mr. Noman
d. Average time M. Noman takes for praying Isha Salah
e. Which salah is missed mostly by M. Saleem
f. Which salah is missed the second most by all people
Create an array of user defined size. Fill this array with random numbers (Auto Generated). Create a menu from 1 to 6 to perform operation on array. As the option is selected, it calls a function with appropriate parameters and return type.
1. Average of all values.
2. Update an item(Ask the user for index and new value)
3. Print the array
4. Find minimum
5. Find maximum
6. Search a number(search a value entered by user and tell the index if found)
7. Print the array in reverse order
A multinational company opens multiple branches all over that Pakistan. If you are hired to design the networking from the company, what type of network you will select? What type of network topology will be suitable for the linking different branches or different department inside the single company branch? List down the network equipment you may require during this implementation.
Suppose a business person launches new cinema at Islamabad and ask his team to develop a ticket system for box office. He assigns some requirements about system that how should it work. The requirements are such a way that there are only '5' number of box office windows in the theatre. Each window can have at max '20' number of people waiting in line. To start with, only one window is opened. If the number of people waiting in line in that window exceeds 20, then the next window is opened and people can join the line in that window. Likewise, if both the first and second windows have n number of people waiting in each queue, then a third window is opened. This can go on until the maximum number of windows w is reached. Let us assume that once a window is opened it never closes. A new window is only opened if all open windows are full. Each person can buy only one ticket. So, the system should not allot more than one ticket per person. Let us assume that the system issues one ticket each across all open windows. When a ticket is issued, the count of the number of people in each open queue is reduced by 1.
When a new person has to join the queue, the system has to prompt him to join a queue such that they are issued a ticket as fast as possible. The system prompts the person based on these factors: o First it looks for an open window with the least number of people and prompts that window number. If more than one window has the least number of people, then the system can prompt the person to join the first window (smaller window ld) it encounters with the least number of people. If the queues of all open windows are full and a new window can be opened, then the new person is prompted to join the new queue for the new box office window. O If all queues for all windows are full, a corresponding message is displayed. That person need not be considered in the next iteration .After a queue is prompted to a person, the person or system cannot change the queue.
Implement the system based on above scenario in java using suitable data structure.
Difference b/w inline and block element
Convert these queries to relational algebra expressions
a) select rackets
from Qaza
where NAME="A";
b) SELECT COUNT (name)
from female
where question1=Null
c) SELECT Count(SALAH)
From SALAH
WHERE follow=false
d) select AVG(time)
from prayer
where name ="M.Noman"
e) SELECT name
from slalah
where repetation=max
f) select name
from salah
where repetation<max