Create Class (PSL), having
1. Data items: M , W , L, T, P
2. Constructors: Defualt, Parameterized, Copy
3. Member functions: getdata(), setData(), showdata() const
4. Static class data: total number of teams (objects) created
5. Constant Object : e.g LQ
Lets assume you create a system which asks the user for the number of students and the number of test scores per student. A nested inner loop, should ask for all the test scores for one student, iterating once for each test score. The outer loop should iterate once for each student and take student name as input. After taking input for 3 test scores, calculate average for each student. Take 3 test scores and 4 students.
Note: use do-while loops
A certain charity designates donors who give $10,000.00 or more as
Benefactors; those who give $1,000.00 or more but less than $10,000.00 as
Patrons; those who give $200.00 or more but less than $1,000.00 as Supporters;
those who give $15.00 but less than $200.00 as Friends; and those who give
less than $15 as Cheapskates.
Write a program containing a nested if-else statement (or statements) that,
given a keyboard input with the amount of a contribution, outputs the correct
designation for that contributor.
Here’s an example that illustrates what your program should look like in
action:
~/ python donor.py
Enter the amount of a contribution: $5.20
Cheapskate!
Test your program also for the input values: 10000.00, 1000.00,
999.99, 12200.00,15.00, 499.99, 2200.00, 199.99, 75.33
An appropriate error message should be output (and your program should halt) when
an amount less than 0 is input.
Consider a scenario where a “Class A” network is divided into 7 subnets of fixed length.
Design each subnet and find the IP Range and subnet mask of each subnet. (Choose any class-
A address). (5 marks)
Q3.2: A sender needs to send the two data items 010011 and 010110, find the checksum at
sender and receiver to check if there is any error or not? (5 marks)
Q2.1: Mention and explain each field of IPv6 header in detail, by taking suitable examples. (5 marks)
Q2.2: Find the first address, last address and the number of addresses of a network whose one
of the IP addresses is 50.28.22.75 / 28. (5 marks)
Explain the different methods for control access control? (5 marks )
Explain various error detection method? (5 marks question)
An organization is granted a block of addresses with the beginning address 150.25.0.0/24. The organization needs to have 3 subblocks of addresses to use in its three subnets: one subblock of 11 addresses, one subblock of 40 addresses, and one subblock of 125 addresses. Design the network and plot it completely with respective subnets, IP range, Network IDs
Write a program that works with fractions. Your program should be able to add,
subtract, multiply, and divide two fractions. Write a separate function for addition,
subtraction, multiplication and division. Specifically, your program must request
two fractions from the user, getting the numerator and denominator separately for
each fraction, and the operation to perform (add, subtract, multiply, or divide).
Your program will then compute the resulting fraction, keeping the numerator and
denominator separate, and output the result.
Note:
Make the structure for fractions. Then declare variable of fractions and use
them for addition and multiplication etc....
6. Write a Java program that will print the following series until it reaches 100.
1 1 2 3 5 8 13 …………………………
7. Write a java program to find the sum of the series up to the nth term where n is input by the user.
1+(1+n)+(1+n+n)+(1+n+n+n)……………….nth Term
Example: input n = 6
Output: 1+7+13+19+25+31 = 96