Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please try to solve it with the IDE named BlueJ and send the screenshot of the codes from BlueJ Java Programming: Coursework 1 Part 1
Please try to solve it with the IDE named BlueJ and send the screenshot of the codes from BlueJ
Java Programming: Coursework 1 Part 1 [20 marks] 1. Write a console program that prints the first 10 positive even numbers on screen. (4 marks) 2. Write a program to calculate the area of a circle and print it on the screen? your program MUST read in input for "radius (double radius) via keyboard. The program must continue running until the user offers to exit the program by entering a sentinel value. A sentinel value is the value that will decide if the programme will continue to run or exit. (6 marks) 3. Given the following information of a class. Class Name: Person Attributes: personlD, firstName, lastName, personage, personHeight, person Weight a. Develop the Java code to represent the class. Choose appropriate data types for the attributes. (4 marks) b. Develop the mutator and accessor (setter and getter) methods for accessing the instance variables (attributes). (4 marks) C. Describe how you achieved encapsulation in your code above. Describe with an example (2 marks) Answers for all Java based questions MUST be accompanied by screenshots (code and result) of the IDE (Blue)). Failing to do so will result in the loss of marksStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started