. What is the likely future of the “open source” software movement?
Question #198286
Using graphical user interface.
We want to design a system for a company to calculate salaries of different types of employees.
https://ibb.co/swS948B
Every employee has an employee ID and a basic salary. The Commissioned employee has a sales amount and rate. Hourly employee is paid on the basis of number of working hours. A regular employee may have a bonus. You have to implement all the above classes. Write constructor for all classes. The main functionality is to calculate salary for each employee which is calculated as follows: Commissioned Employee: Total Salary=sales amount*rate/100+basic salary Hourly Employee: Total salary=basic salary + pay per hour*extra hours Regular Employee: Total salary= basic salary + bonus You have to define the following function in all classes: float calculateSalary() and run the given main() for the following two cases: 1. when the calculateSalary() in base class is not virtual
2. when the calculateSalary() in base class is made virtual
draw a sequence diagram for the below-given scenario :
Completing the counselling process of a student in which the initial message from the system’s user interface is sent to the Counselling object to verify the student. Then the second message to the counsellor objects to prepare a schedule. The counsellor checks for a free slot for counselling and once it is available it will be added to the schedule. Once the schedule is updated a message will be sent to the student object and another message to the user interface to confirm the student schedule.
Can you please provide the code, with this question below. Please don't use def in doing the code, please do a simple one. Thankyou!
Using the discussed methods, Convert the following Infix Expression to its equivalent Postfix and Prefix Expression
Can you please rewrite the code, without using def.
opening_list = ["[", "{", "("]
closing_list = ["]", "}", ")"]
def parenthesis(str):
stack = []
for j in str:
if j in opening_list:
stack.append(j)
elif j in closing_list:
position = closing_list.index(j)
if ((len(stack) > 0) and
= (opening_list[position] == stack[len(stack) - 1])):
stack.pop()
else:
return "Unbalance"
if len(stack) == 0:
return "Balance"
else:
return "Unbalance"
string = input("Enter the set of parenthesis: \n")
print(string, "-", parenthesis(string))
Can you please rewrite the code below. Please, thank you. This is the question:
Create a program that will convert an infix expression entered by the user to its equivalent prefix and postfix expression Sample Output: Enter an Infix Expression: a+b^(c^d- e/(f+g)+(h^i)^j) <input> Postfix Expression: abcd^efg+/- hi^j^+^+ <compute> Prefix Expression: +a^b+- ^cd/e+fg^^hij <compute>
prefix = input("Enter an Infix Expression: ')
infixstack = []
x = len(prefix)
for i in range (x) :
index = (x-1)-i
if prefix[index == " + " or prefix[index] == "-" or prefix[index] == "-" or prefix[index] == "*':
op1 = infixstack.pop()
op2 = infixstack.pop()
Infix = "(" op1 + " " + prefix[index] + " " + op2 + ")"
infixstack.append(Infix)
else:
ifixstack.append(prefix[index])
print(*infixstack)
Can you please rewrite this program without using class and def, The question is given below. i didn't input all the code because it's too long. i need a simple one.
Create a program that will convert an infix expression entered by the user to its equivalent prefix and postfix expression Sample Output: Enter an Infix Expression: a+b^(c^d- e/(f+g)+(h^i)^j) <input> Postfix Expression: abcd^efg+/- hi^j^+^+ <compute> Prefix Expression: +a^b+- ^cd/e+fg^^hij
class infix_to_prefix:
precedence={'^':5,'*':4,'/':4,'+':3,'-':3,'(':2,')':1}
def __init__(self):
self.items=[]
self.size=-1
def push(self,value):
self.items.append(value)
self.size+=1
def pop(self):
if self.isempty():
return 0
else:
Ex [08 Marks]
A Network administrator has been given a range of Class C IP address 192.168.1.0 /24. He has to design a network considering the requirement given below. Each department will get one subnet. Write down all the subnets.
Admin: 10 users, Operations: 18 users, Supply Chain: 3 users, IT: 14 users, HR: 5 users,
Branch Office1: 35 users, Branch Office2: 15 users
Ex
a) How a damaged or lost frame is recovered in a communication between a sender and a receiver using Selective Repeat ARQ. Explain with the help of flow diagram.
b) Bandwidth of the line is 2 Mbps, and 1 bit takes 30 ms to make a round trip. What is the efficiency of the link if a frame size is 1500 bits? Use Go Back-N protocol. Sender is allowed to send 15 frames at a time.
Convert the pseudocode below to flowchart
Start
Declare Answer as character
Declare Count, sum, Veh_Weight as integer
Count = 0
sum = 0
for (Count < = 2000) do
Print "Do you wish to drive across the bridge, Y for yes and any other for No"
Read Answer
if (Answer == 'Y')then
Print "Enter weight of your vehicle"
Read Veh_weight
Sum = sum + Veh_weight
else
print "Thanks for stopping by. Maybe next time"
endif
end for
if (sum <= 15000) then
print "The bridge can maintain approximately another 50000KG
else
if (sum<= 30000) then
Print "The bridge has reached almost half its maximum weight capacity"
else
Print "The bridge is at its maximum weight capacity"
endif
endif
Stop