Control Structures: As a build-up from the previous question, consider 3 possible scenarios of input: A character, number, or word. Your program should then do the following:
Sample Run 1 Sample Run 3
Enter a character, number or word : c Enter a character, number or word : 7
Output 1 : C is not a vowel Output 3 : 7 is a prime number
Enter a character, number or word: programming
Output 2: Programming is not a palindrome
Using the provided recording and your knowledge from programming 1. Create a program in java that takes in an input from the user and checks whether it’s a number or a word. In case a number is entered the program should print the number to the power 3 and if a word is entered your program should split that word into 2.
Write a program in Java that ask the user to enter their name, year of birth, and salary. The program must display thier name, age, and salary.
In the file RandomNumbers.java, write a class called RandomNumbers that has three integer instance variables: var1, var2, and var3. Write getter method for each variable: getVar1(), getVar2() and getVar3() and a RandomNumbers constructor that set the initial values of all the instance variables to 0. Then write the following 2 instance methods:
• setRandomValues( ) - accepts a low and high integer values as parameters, and sets var1, var2, and var3 to random numbers (generated using the Random class) within the range of the low and high input values (inclusive).
• getRandomValues( ) - prints out the 3 random numbers in the format: "Random values: var1 var2 var3"
Ex: If the input is:
15 20
the output may be:
Random values: 17 15 19
where 17, 15, 19 can be any random numbers within 15 and 20 (inclusive).
Write
a java program named Vaccination that uses class named Child and subclasses
which displays Chronic diseases (at least 5 types of chronic diseases),
VaccinationInsurance (Includes short post-symptoms, hospitalization, allergic,
prolong post-symptoms) and DoseReward for example first dose they are
eligible to get free basic dental screening, second dose the kids eligible to get
voucher to buy school uniforms and etc. These designated classes should have
their own task accordingly. Calculation for selected classes is needed
Allow user to key in their details and needs. Use Kids Vaccination Program as
your reference to support your project. Each of the subclasses contains the
method and data fields. You are recommended to use passing value from the
main class or other classes to avoid set your own data for this project. Use legit
data and legit information and calculation for your program.
with the use of object-oriented technique, create a programme, categorised as users or authors and additionally be implemented as students or staff members. Further objects within the library could be books and other equipment or materials within the system. The system should have the basic operations such as authentication with different user roles and management of users. Different users should be able to borrow books or request usage of any facility within the library which should additionally be tracked by time to indicate return time or check out time in cases of facility usage.
In plane geometry, the x- and y axis of a 2D Cartesian system divide it into four infinite regions called quadrants. Your task is to model each point with an x-value and y-value. Apart from the constructors, getters, and setters, implement a getQuadrant method to determine the region in which a given point falls.
Sample Run1 Sample Run2
Enter the x and y value: 5 8 Enter the x and y value: 7 -3
Output1: Point (5,8) is in Quadrant I Output2: Point (7,-3) is in Quadrant IV
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
1. Create a project to model student with firstname, lastname, age, gender and student number. Create two construtors, 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 an 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 Full names : Kelly Daniela Age : 40 Gender : F Student Number : 22201002
Create a project to model student with firstname, lastname, age, gender and student number. Create two construtors, 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 an 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 Full names : Kelly Daniela Age : 40 Gender : F Student Number : 22201002