Write a class that contains variables to hold your tuition fee and your book fee. Display the sum of the variables. Save the class as Fees.java.
Create a program that will allow user to enter two numbers. Using a function, compute and display for its summation.
Create a project to model students with firstname, lastname, age, gender and student number. Create two constructors, one to be used as default and another to include all attributes. Add a class attribute to keep count of all registered students. Use the class attribute to generate student numbers with the following format 22201XYZ, where XYZ is the current count provided by the class attribute. Implement the respective getters and setters for each attribute. Now given a list of student information create the respective objects and print out their details see samples below, make sure the student class has a toString method.
Sample Run1
2
John Doe 29 M
Kelly Daniela 40 F
Output1:
Full names : John Doe
Age : 29
Gender : M
Student Number : 22201001
Write a class that contains variables that hold your hourly rate of pay and the number of hours that you worked. Display your gross pay, your tax please refer in the table below and your net pay (gross pay – tax).
Gross pay Tax
----------------------------------------
Below 2000 | No tax
2001 - 3000 | 5%
Above 3000 | 10 %
Write an application for a furniture company; the program determines the price of a table. Ask
the user to choose one for pine, 2 for oak, or three for mahogany. The output is the name of the
wood chosen as well as the price of the table. Pine tables cost $100, oak tables cost $225, and
mahogany tables cost $310. If the user enters an invalid wood code, set the price to zero. Save
the file as Furniture.cs
Write a java program that can be used by a policeman to determine if a vehicle has exceeded the speed limit and to levy a fine. The policeman should enter the vehicles speed and the speed limit. If the speed limit is exceeded by less than 30kph a fine of Kshs. 2500 should be charged. Otherwise a fine of Kshs 4000 is charged. Your program should then output (in a suitable format) the vehicle speed, the speed limit, the excess speed and the fine levied.
Write a program that when run, produces a menu showing beer brands and their prices and then prompts the user enter his/her choice (1,2,3 or 4). The user is then asked how many bottles he/she wants. He is then given the total cost (depending on the cost of the beer chosen) as the output. See sample dialog below. If he/she enters an invalid choice e.g. 8, he/she should get an error message.
Write a c++ program that takes a number from the user and prints factors of the number.
The placement session has begun in a college. There is N number of students standing outside an interview room in a line. It is given that the person who goes first has higher chances of selection.
Each student has a number associated with them representing their problem-solving capability. The higher the capability the higher the chances of selection. Now every student wants to know the number of students ahead of him with higher problem-solving capability.
Input: 6(number of students) {4 , 9 , 5 , 3 , 2 , 10}
Output: {0 , 0 , 1 , 3 , 4 , 0}
by CodeChum Admin
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.
Input
1. Value of n1
Description
The first integer of the range
Constraints
The value of n1 is guaranteed to be lesser than or equal to n2.
Sample
32. Value of n2
Description
The second integer of the range
Constraints
The value of n2 is guaranteed to be greater than or equal to n1.
Sample
10Output
The first line will contain a message prompt to input the value of n1.
The second line will contain a message prompt to input the value of n2.
The next line will contain all the even numbers from n2 down to n1.
Enter·value·of·n1:·3
Enter·value·of·n2:·10
10·8·6·4