Write a class rectangle and store the length and width of the rectangle. Write a member function called increment that will increment to length and width. Also write the function to find the area of a rectangle and then write the accessor function that will display the length, width and area of the rectangle. Demonstrate the use of the object in the main function.
class rectangle
{
private:
int length, width, area;
public:
}
Develop a Java program to allow computation of student marks in Eng, Math, Chem, Geo, and Physics. The teacher can enter marks for any number of students. He/she can press ‘E’ on the keyboard to stop entering marks. All marks should be stored in an array. When teacher presses E, the program computes and displays total marks, average, highest mark and lowest mark for each student. Use appropriate math functions for average, highest mark, lowest mark, a function which will be called every time the teacher needs to continue putting in marks, and control structures to guide the flow of the program.
Part 3: KNN
Write a pseudocode algorithm for the problem
JamEx Limited requires a program to calculate and print the commission received by a salesperson. The program should process an undetermined number of salespersons and appropriately terminate by a predefined input. The commission rate is based on two factors, the amount of sales and the class to which a salesperson belongs. The input will be the salesperson number, sales amount and class. The commission rate will be based on the following criteria:
Class=1
If sales is equal to or less than $1000, the rate is 6 percent.
If sales is greater than $1000 but less than $2000, the rate is 7 percent.
If the sales is $2000 or greater, the rate is 10 percent.
Class=2
If the sales is less than $1000, the rate is 4 percent.
If the sales is $1000 or greater, the rate is 6 percent.
Class=3
The rate is 4.5 percent for all sales amount
Class=any other value
Output an appropriate error message
Write a program to determine whether a year entered through the keyboard is a leap year or not. Also determine whether the year is your year of birth, starting your school, start or end of matriculation (or O-levels etc), start or end of Intermediate education (FSC, A-levels, ICOM, ICS etc) or year of starting your education in COMSATS University?
Discuss the IPv6 Datagram with the help of suitable examples.
What is the distinction between a process-oriented and a structure-oriented design retionale technique? Would you classify psychological design rationale as a process or structure oriented?
Create a C++ program that will prompt the user for a line of text. This line of text must be written to a text file called info.txt
Once the line of text has been written, display a text on the screen alerting the user that information has been written to a file successfully.
What are the seven Norman's principles for transfoming difficult tasks into simple ones!?
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.