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

n 1 

(Marks: 40) 

Sam runs a local musical equipment store in your neighbourhood. He has contracted you to create 

an interactive application that will assist him with customer purchases. Create a class named 

Customer Purchases that will contain get and set methods for a customer number, first name, 

surname, product, price and quantity. Create a separate class called Printing that will include a 

method called Print Details, that will print the Customer Invoice. In the Printing class include 

another method called Customer Purchase Report which will display the following information: 

REPORT OPTION 

PERCENTAGE

TAX

15%

COMMISSION

8.5%

DISCOUNT

10%

TOTAL

(Price + Tax) – (Discount + Commission) 

In your main class, capture all the customer purchase details required to produce the reports. 

Sample Screenshot 1 

Sample Screenshot 2 

Sample Screenshot 3 

© The Independent Institute of Education (Pty) Ltd 2021 



Write a program that reads a file of numbers of type int and writes all the numbers to another file, but without any duplicate numbers.Assume that the numbers in the input file are already ordered from smallest to largest. After the program is run, the new file will contain all the numbers in the original file, but no number will appear more than once in the file. The numbers in the output file should also be sorted from smallest to largest. Your program should obtain both file names from the user

Create a class named 'Member' having the following members:

Data members

1 - Name

2 - Age

3 - Phone number

4 - Address

5 - Salary

It also has a method named 'printSalary' which prints the salary of the members.

Two classes 'Employee' and 'Manager' inherits the 'Member' class. The 'Employee' and 'Manager' classes have data members 'specialization' and 'department' respectively. Now, assign name, age, phone number, address and salary to an employee and a manager by making an object of both of these classes and print the same.


Design a method that determines whether or not a binary tree is fully balanced. This method takes no parameters, and returns a boolean value: true if the tree is fully balanced, and false if it is not.


Question 3 (Marks: 40)

The college that you attend requires an application that will print out a Course Report. You are 

required to create an application that will allocate the following course data:

COURSE CODE COURSE NAME STUDENT NUMBERS LECTURER

DISD Diploma in Software Development 35 Mr Jones

DIWD Diploma in Web Development 28 Mrs Smith

DIDM Diploma in Data Metrics 39 Mr Ntsinga

Create a class named Course_Details that will contain get and set methods for the course name, 

student numbers and lecturer. In the Course_Details class include a method called Assign Venue 

that will randomly generate a Venue/Class for the course. Venues can be from 1 to 3 only. Your 

main class must include a static method to handle the printing of the course report.


Question 2 (Marks: 20)

The organisation you work for has asked you to create an interactive application that will assist 

with the allocation of employees to a cell phone network provider and phone number generation. 

You are required to prompt a user for three employee names which will randomly assign the 

employee to either the Vodacom, MTN or Cell C network. The employees also require a randomly 

generated phone number. The start of each phone number will begin with the following, 

depending on the network provider:

NETWORK PROVIDER START

Vodacom 072

MTN 083

Cell C 084

The remaining numbers of the phone number must be randomly generated.


Question 1 (Marks: 40)

Sam runs a local musical equipment store in your neighbourhood. He has contracted you to create 

an interactive application that will assist him with customer purchases. Create a class named 

Customer Purchases that will contain get and set methods for a customer number, first name, 

surname, product, price and quantity. Create a separate class called Printing that will include a 

method called Print Details, that will print the Customer Invoice. In the Printing class include 

another method called Customer Purchase Report which will display the following information:

REPORT OPTION PERCENTAGE

TAX 15%

COMMISSION 8.5%

DISCOUNT 10%

TOTAL (Price + Tax) – (Discount + Commission)

In your main class, capture all the customer purchase details required to produce the reports.


Example of Insertion in Red Black Trees in Data Structures.


(with GUI) developed with Java programming language.Use NetBeans Application.

Create a project named “FavoriteBooks” which keeps a list of the books that a user has read and liked.

Book id, Title, Category, First Author Name and Surname, Award Winner, Rating, Year, Number of Pages, and Short Description.

Functions:

1. Add a Book to the list with the given book id from a JTextField.

a) Data to be entered using JTextField components are: Title, Category, Author Name and Surname, Award Winner, Rating, Year, Number of Pages and short Description. This task should add the book to the text document.

b) Rating option can be selected from a JComboBox.

c) JTextArea can be used to enter a short description of the book.

d) Do not create a JTextField to enter the book id. Instead, the book id should be incremented automatically by checking the last book id in the text document.


1 Write the pseudocode that will accurately represent the application you are designing.


LATEST TUTORIALS
APPROVED BY CLIENTS