
Java object oriented programming
create a program called AddressPeople with 5 attributes

import java.util.*;
public class AddressPeople
{
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
System.out.print("Enter name: ");
String name=s.nextLine();
System.out.print("Enter occupation: ");
String occupation=s.nextLine();
System.out.print("Enter age: ");
int age=s.nextInt();
System.out.print("Enter salary: ");
int salary=s.nextInt();
System.out.print("Enter phone_number: ");
int phone_number=s.nextInt();
System.out.print("name="+name+"\n");
System.out.print("age="+age+"\n");
System.out.print("occupation="+occupation+"\n");
System.out.print("salary="+salary+"\n");
System.out.print("Phone_number="+phone_number);
}
}
Step by stepSolved in 2 steps

- When referring to object-oriented approaches, what does the term "encapsulation" really mean?arrow_forwardDescribe how object-oriented and procedural programming languages vary in terms of functional properties.arrow_forwardEncapsulation, polymorphism, and object models are all linked in object-oriented programming.arrow_forward
- This section should provide a detailed discussion of the differences between procedural and object-oriented programming languages.arrow_forwardObject-oriented programming and design patterns have a link that must be described in further depth.arrow_forwardObject-oriented programming is unique.arrow_forward
- Describe how object-oriented and procedural programming languages vary in terms of functional properties.arrow_forwardDescribe the functional differences between procedural and object-oriented programming languages.arrow_forwardObject-oriented and procedural programming languages each have their own set of advantages and disadvantages in terms of the functionality they give.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





