Java | JSP | JSF Answers

Questions: 4 418

Answers by our Experts: 3 943

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Building name: Engineering Venue number: 2.38 Number of seats: 80 3 Write the method problemVenue() for the Venue class. This method returns the boolean value false. ComputerLab class Code the attributes and methods as per diagram for the ComputerLab class. 1 Remember to call the superclass constructors in the coding of the ComputerLab constructors. 2 Remember to call the superclass toString() in the ComputerLab toString(). 3 Code the show() method. This method is void and displays the details of a ComputerLab object. Again, remember to call the show() of the superclass. Building name: Engineering Venue number: 1.24 Number of seats: 40 Number of working computers: 35 4 Code the method problemVenue. This method returns a boolean value of true if the numberSeats in the computer lab is more than the numberWorkingComputers, else a boolean value of false is returned.
Program 7 Rooms You are required to assist with CPUT. W rite the JAVA classes. the development of a system to manage venues and computer labs at UML class diagram of two base classes Venue class Code the attributes and methods as per diagram 1 for the venue class. Assign the values unknown or zero to the attributes in the noargument constructor. 2 Write the method named show() for the Venue class. This method is void and does not have any parameters. This method displays the details of a ve nue object as follows (real data values are used for building name, room number and number of seats): 1 Applications Development Foundations I
PostGraduate

-thesis: String

+<<constructor>> PostGraduate()

+<<constructor>> PostGraduate(String,String,Long,double)

+setThesis(String): void

+getThesis(): String

+toString(): String

+show(): void

+interest(): double

Code the method interest(). This method returns a double value calculated as follows: loanAmount times 10%.

Write a Java program that displays at least four (4) lines of your favorite song. Name the class as FavoriteSong.java and add meaningful comments to the class.


You will create Cart class as a context class to get total price and add product.

◦ To implement Strategy pattern, depending on the country of shipping, the relevant customs duty is charged and the shipping cost of Europe Shopping, America Shopping increases. Large products (XL-size) have an additional charge. Create AmericaShopping and EuropeShopping concrete class.

◦In the USA, the duty tax is 1% and the base delivery fee is $15. In America, an additional tax different from the customs tax is applied and this tax is 0.75%. Customs duty should be added to the item fee for each item.

◦In Europe, the customs duty is 1.5% and the base delivery fee is £11.

◦In America, $5 should be added to the shipping fee when each item is added. But if the added product size is XL, $10 should be added to the shipping fee. In Europe, this should only be done if the product size is XL.


StudentLoans class

6 Code a method displayLoanAmounts(). This method display all the loan amounts and the interest on those amounts. Output format example:

Loan amounts and Interest

--------------------------

10000.0 500.0

-------------------------

50000.0 2500.0

-------------------------

20000.0 2000.0

-------------------------


StudentLoans class 

5 Code a method displayAllStudents(). This method has no parameters and is void. This method displays all the objects in the array.

a) Display a heading .

b) Loop through the array and use the show() of every object to display the object details. c) Print a line after each object is displayed. Example of expected output:

Displaying all students

--------------------

Student details

Name: Smittie

Student number: 12345

Loan amount: 10000.0

-------------------------

Student details Name: Jannie

Student number: 67543

Loan amount: 50000.0

-------------------------


StudentLoans class 

3 Code a method named createStudent(). This method has no parameters, but returns a Student object.

a) Define a Scanner variable to read from the keyboard.

b) Define variables for name, student number and loan amount. Prompt the user to type data values for each of the variables and then read the values from the keyboard.

c) Define and create a Student object from the data read from the keyboard.

d) Return this Student object.

4 Code a method named createPostGraduate(). This method has no parameters, but returns a PostGraduate object.

a. Define a Scanner variable to read from the keyboard.

b. Define variables for name, student number and loan amount and thesis. Prompt the user to type data values for each of the variables and then read the values from the keyboard.

c. Define and create a PostGraduate object from the data read from the keyboard.

d. Return this PostGraduate object.


StudentLoans class

1 Code a no-argument constructor. In this constructor, a) Add 2 Student objects to the Students array. b) Add 2 PostGraduate objects to the Students array. c) Set noOfStudents to 4.

2 Code a method menu() that returns an int value. This value represents the choice the user has made from the available menu options. a) Define a Scanner variable to read from the keyboard. b) Define an int value, named choice. c) Display a menu in the following format:

1: Add student

2: Display students

3: Display interest

4: Exit

d) Read the user’s choice from the keyboard.

e) Return the choice read from the keyboard.


PostGraduate

-thesis: String

+<<constructor>> PostGraduate()

+<<constructor>> PostGraduate(String,String,Long,double)

+setThesis(String): void

+getThesis(): String

+toString(): String

+show(): void

+interest(): double


Write the PostGraduate class as per the class diagram. Remember to call the super class methods or constructors as needed. show() method This method is void and displays the details of a PostGraduate object as follows:

Student details Name: Mpho

Student number: 201812345

Loan amount: 10000.0

Thesis: I do not know

Code the method interest(). This method returns a double value calculated as follows: loanAmount times 10%.


LATEST TUTORIALS
APPROVED BY CLIENTS