Construct a class called Rectangle. A Rectangle has both a length and a width (both positive integers). Access to them should be only inside the class and within the inheritance hierarchy. Then implement the following:
Write an if-else statement that if userTickets is greater than 5, executes award Points = 15 Else, execute award Points = user Tickets. Ex: If user Tickets is 14, then award Points = 15.
3.1 Write a Java program that will compute the future investment value at a given interest rate for a
specified number of years. The java program should have a minimum of two classes.
3.1.1 classA
The main method (starting point) (5)
The object of classb (5)
Should also call the void method named futureInvestmentValue (double investment
Amount, double monthlyInterestRate, int years) (15)
3.1.2 classB
A get method named count_words(String str) (15)
Expected Output:
Input the investment amount: 28000
Input the rate of interest: 7
Input number of years: 6
Years Future Value
1 30024.12
2 32194.57
3 34521.92
4 37017.51
5 39693.51
6 42562.95
1. Create a java program that will count all words in a sentence. The program should have a
minimum of two classes.
1.1 The first class should be named class1, this class will have the following:
The main method (starting point) (5)
The object of class2 (5)
Should also call the get method count_words(String str) (5)
1.2 The second class should be named class2, this class should have the following:
A constructor (5)
A get method named count_words(String str) (10)
1.3 Construct a flowchart for class1 and class2 both combined.
Q.1.2. As part of the requirements analysis when designing a network,
a. Explain what are functional requirements are and then list three functional requirements as examples for the identified network system scenario in Q.1.1.
b. Explain what are performance requirements are and then list three performance requirements as examples for the identified network system scenario in Q.1.1.
c. Explain what are implementation constraints are and then list three implementation constraints as examples for the identified network system scenario in Q.1.1.
Q.1.3. Using Q.1.1 and Q.1.2 above, discuss the relationship between the concepts presented in the exhibit. In particular, use examples to explain the importance of understanding these relationships in network systems design.
Identify a suitable network design scenario that can be used to explain and discuss
the relationship between the concepts in the exhibit. Ensure that you provide
details of the following aspects of the scenario:
a. A description of the network design scenario;
b. How can the scenario be used to discuss and explore the relationship of the concepts in the exhibit?
In this task, you are being asked to write a loop in Java.
Write a program that uses while loops to perform the following steps:
a) Prompt the user to input two integers: startingNum and endingNum (startingNum must be
less than endingNum).
b) Output all even numbers between startingNum and endingNum.
c) Output the sum of all even numbers between startingNum and endingNum.
d) Output the numbers and their squares between startingNum and endingNum.
e) Output the sum of the square of the odd numbers between startingNum and endingNum.
1. Create a program called WhileLoops.java. All loops will be written in this file.
2. Create appropriate variables and assign values using a Scanner object.
3. Correctly display appropriate messages.
write an application for a furniture company; the program determines the price of a table. ask the user to choose 1 for pine, 2 for oak, or 3 for mahogany. the output is the name of the wood chosen as well as the price of the table. pine tables cost r 100, oak tables cost r 225, and mahogany tables cost r 310. if the user enters an invalid wood code, set the price to 0 and allow the user to select an option up to 3 times . save the file as furniture.java. marks allocation 1. presentation of a menu - 10 select an option 1. for pine 2. for oak 3. for mahogany 2. use of a loop - 10 3. use of an if statement/ switch - 10 4. correct output "-10"
Write an application for Furniture Company Sdn Bhd, the program determines the total price of a table. Ask the user to choose 1 for pine, 2 for oak, or 3 for mahogany and prompt the user to enter the number of a table. The output is the name of the wood chosen as well as the price of the table. Pine table cost RM100, oak tables cost RM225, and mahogany tables cost RM310. If the user enters an invalid wood code, set the price to 0.
Furniture Company Sdn Bhd also gives an appreciation for the member card holder with 6% off from the total price. The above price is exclude government tax RM 5.60.
Save the file as Furniture.java.
Write an application for Furniture Company Sdn Bhd, the program determines the total price of a table. Ask the user to choose 1 for pine, 2 for oak, or 3 for mahogany and prompt the user to enter the number of a table. The output is the name of the wood chosen as well as the price of the table. Pine tables cost RM100, oak tables cost RM225, and mahogany tables cost RM310. If the user enters an invalid wood code, set the price to 0.