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

An University would like to introduce an automated student number and email generation system. The system takes into consideration the following: a) To generate the student number it takes three letters(the first, middle and last letter) of the student’s surname and adds it to the first three letters from the first name, then finally adds a three digit postfix number. b) To generate the email is quite easy it just takes the first letter from the first name and adds it to the surname , then it adds the @students.nust.na postfix Your task is to create a program that can achieve the above requirements when given the students surname, first name and three digit postfix through CMD arguments.


run 1:

java InClass01_task01 Kandjeke Jenifer 003


Output: Good day Jenifer welcome to NUST.

Your email address is : jkandjeke@students.nust.na

Student number : KJEJEN003


run 2:

java InClass01_task01 Kavezemba Terry 001


Output: Good day Terry welcome to NUST.

Your email address is : tkavezemba@students.nust.na


Program 7 - Rooms

You are required to assist with the development of a system to manage venues and computer labs at CPUT. Write the JAVA classes.

UML class diagram of two base classes

RunVenues

Code the class RunVenues. The outline of the class is as follows:

public class RunVenues { public static void main(String[] args) {

//Add code 1 here //Add code 2 here

}

}

1 Create an object of the type VenueControlClass..

2 Call the menuControl() in the VenueControlClass class by using the object.




RunVenues

Code the class RunVenues. The outline of the class is as follows:

public class RunVenues {    public static void main(String[] args) {

       //Add code 1 here        //Add code 2 here

   }

}

1

Create an object of the type VenueControlClass..

 

2

Call the menuControl() in the VenueControlClass class by using the object.

 

 

 


Write a program named StringCompare.java which will prompt the user for three Strings, his/her favorite color, favorite fruit and favorite flower. 


Use Scanner object to read in user's strings in corresponding order (color, fruit, flower). (I will expect you to use three next() methods for three inputs!)


Conduct two separate checks in the following order:

1. If either of the values entered for color or fruit is 'orange', convert both color and fruit to UPPERCASE.

2. If either of the values entered (for color or flower) is 'violet', convert both values for color and flower to "vIoLeT" (alternating lower and upper case letters).  

Then print each value on its own line: color, then fruit, then flower.


Sample I/O (user input is in orange bold-italics):


Enter your favorite color, fruit and flower:  

pink orange rose

PINK

ORANGE

rose




Write a java program named: CoinConverter.java  

(Note: We do not need loops for HW 4! We haven't yet covered them when it was assigned.)

This program will prompt the user for a number of cents, reading in the value from the keyboard. The number entered should be an integer.

Using the value entered, calculate and print the number of quarters, dimes, nickels and/or pennies needed to achieve the value entered. If no coins of a denomination are needed, print 0 that value (e.g., if only quarters and pennies are needed, print "0 dimes" and "0 nickels").  Make sure you print only "quarter", "dime", "nickel" or "penny" when only 1 coin is required.


Enter a number of cents, and I'll tell which coins are needed to achieve that value: 

67

2 quarters

1 dime

1 nickel

2 pennies

Another example:



The statements below shows the declaration of an array:

 

String[] Municipality ={”Steve Tshwete”, “Nkomazi”, “City of Mbombela”, “Govan Mbeki”};

 

1) Make use of a loop of your choice and write statement(s) that will display all array elements indicating the Municipality’s name starting from: 

 

Municipality 1: Steve Tshwete

Municipality 2: Nkomazi

etc



Given the following declarations, what is the result

of each of the expressions?

   int w = 2, y = 7, z = 12;

a. w * z

b. w * z +y

c. w * -z 

d. w * --z + y++

e. w * z-- + ++y

f. w + z * y 

g. w – y + z 

h. (w + y) * z

i. y / w 

j. y / z 

k. w%y 

l. y % w


Given the following declarations, what is the result of each of the expressions?


   double w = 12.9, y = 3.2;

   double z = 12.2

a.w / z

b.z / w

c. w / z - y

d. w – z*y

e. (w – z) * y

f. z / y / w 

g. z / (y / w) 

h. y % z


Kindly answer this urgently. plz, read the instructions carefully.

And this question was answered by another person but there was no main method, without the main method how I can run the project could you please add the main method. 

The program does 2 + 2; I need the program do 3 * 2 ; and 3 / 2; and 3^2;

program code link is given below.

And use the code mention in the link to modify. Thanks

Modify this code so the program do 3 * 2; and 3 / 2; and 3^2; as well.


https://drive.google.com/file/d/1NoVc1HNT9kPNJhnFg0x2V44tak9C0x4c/view?usp=sharing



Given Create a program that when run with a name, an integer and a double as CMD arguments, it prints out a greeting using the name and also print the difference of the two given numbers


LATEST TUTORIALS
APPROVED BY CLIENTS