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. In detail with diagram
Write the pseudocode for the following statement:
The program is to input an examination mark and test it for the award of a grade. The
mark is a whole number between 1 and 100.The program will receive the grade from the
user until the number of entered students is equal to 10 and this should now generate a
report for all the grade entered with the award description. Grades are awarded
according to the following criteria:
>= 80 Distinction
>= 60 Merit
>= 40 Pass
< 40 fail
Write the pseudocode for the following scenario. The final exam marks for 10 students
are 65, 45, 78, 65, 89, 65, 79, 67, 75, and 63. The marks are stored in an array. Find:
• The student with the highest mark.
• The student with the lowest mark.
• The total marks for all the students.
• The overall average.
Create a program that will allow the user to easily manage a list of names.
You should display a menu that will allow them to add a name to the list, change a
name in the list, delete a name from the list or view all the names in the list.
There should also be a menu option to allow the user to end the program. If they
select an option that is not relevant, then it should display a suitable message.
After they made a selection to either add a name, change a name, delete a name or
view all the names, they should see the menu again without having to restart the
program. The program should be made as easy to use as possible.
I'm really fond of even numbers, you know? That's why I'll be letting you make another even number problem yet again. This time, you need to print from a range of two inputted numbers, n1 and n2 (inclusive), all the even numbers from n2 down to n1, in descending order.
Create a program that uses an array of structures of a user-defined type named student_record as shown in the declaration below.
struct student_record{
unsigned long id;
char name[20];
char subject[20];
double mt_grade;
double ft_grade;
double final_rating;
char remarks[20];
};
2. The program should ask how many student records to input (at least 4 records but not more than 20) and allow the user to input as many records of students as specified by the user except for the final rating and remarks. The values for the final rating and remarks should be based on the formula or conditions given below
final_rating = 40%mt_grade +50%ft_grade
remarks
EXCELLENT if the final_rating >=95%
VERY GOOD if the final_rating is between 85% and 94%
GOOD if final_rating is between 75% and 84%
NEEDS IMPROVEMENT if final_rating is below 75%
Display all the records with the computed final rating and remarks in a tabular format
Cite a situation in which you can apply the knowledge of creating straight u through cable.
class Matrix {2x2, 3x3 and 4x4 }private data members:
1. int **matrix
2. int row
3. int col
class public member functions:
1. Matrix (int n1, int n2, int n3, int n4, int row = 2, int col = 2)
2. Matrix (int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int row = 3,
int col = 3)
3. Matrix (int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int
n11, int n12, int n13, int n14, int n15, int n16, int row = 4, int col = 4)
4. Matrix(const Matrix &m)
5. ~Matrix()
6. int getRow()
7. int getCol()
8. int getValue(int row, int col)
9. void setValue(int row, int col, int value)
10. int Total()
11. double Average()
12. int RowTotal(int row)
13. int ColumnTotal(int col)
14. int HighestInRow(int row)
15. int LowestInRow(int row)
16. Matrix Transpose()
17. int LeftDiagonalTotal()
18. int RightDiagonalTotal()
19. Matrix Add(Matrix m)
20. Matrix Subtract(Matrix m)
21. Matrix Multiply(Matrix m)
22. int FindkSmallest(int k)
23. int FindkLargest(int k)
Implement a class Sequence to store a sequence of non-negative integer values, and the length of the sequence. The class has the following private data members:
1. int length
2. int *pseq
The class shall provide the following public methods:
1. Sequence() – default constructor
2. Sequence(int lengthVal, int n1=0,int n2=0,int n3=0, int n4=0, int n5=0, int n6=0, int n7=0, int n8=0, int n9=0, int n10=0) – parameterized constructor should initialize the
length and array to sequence values passed in the arguments.
3. Sequence(Sequence &s)
4. int getLength()
5. int* getSeq()
6. void Sort(int n)
7. int RemoveDuplicates()
Return n after placing the final result in the first k elements of the array.
8. void Rotate(int steps) – a method that rotates the sequence elements clockwise for the
given steps
9. ~Sequence()
Azeem Telco Sdn. Bhd charges file, contains records for each call made by its subscribers during a month. Each record on a file contains the subscriber’s name and phone number, the phone number called, the distance from Shah Alam of the number called (in kilometers) and duration of the call-in seconds.
As a junior programmer, you are required to design and write a complete C++ program that asked the user to enter subscriber’s name and phone number, the phone number called, the distance from Shah Alam of the number called (in kilometers) and duration of the call-in seconds. The user also needs to enter types of call either Local or International call.
The cost of each call is calculated based on Table 1.
Distance from Shah Alam
Less than 25 km
25 <=km<75
75 <=km<300
300 <= km <=1000 Greater than 1000 km
Cost(RM)/minute
Local International 0.35 0.55 0.65 0.85 1.00 1.20 2.00 2.20 3.00 3.20
Your program should use the following:
1. Appropriate Control Structure
2 User Defined Function