Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 marks

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

More Books

Students also viewed these Databases questions