0% found this document useful (0 votes)
5 views2 pages

Assignment 1

Uploaded by

lks992004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Assignment 1

Uploaded by

lks992004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Assignment 1

Q1 What is object and class explain through java code?


Ans-> java code
class Car {
String brand;
int year;
public Car(String brand, int year) {
this.brand = brand;
this.year = year;
}
public void displayInfo() {
System.out.println("Brand: " + brand);
System.out.println("Year: " + year);
}
}

public class Main {


public static void main(String[] args) {
Car car1 = new Car("Toyota", 2022);
Car car2 = new Car("Honda", 2020);
car1.displayInfo();
System.out.println();
car2.displayInfo();
}
}
1)Car is the class with fields (attributes) for brand and year, a constructor to
initialize those fields, and a method (displayInfo) to display information about the
car.
2)Car car1 and Car car2 are objects (instances) of the Car class, each representing
a specific car with its brand and year.
3)The main method demonstrates creating two cars and displaying their
information.

Q2) Give the comparative study of existing microservices frame work. As a


conclusion present your view on best available microservices frameworks and
why?
ANS->Microservices frameworks vary; Spring Boot offers Java versatility,
Django/Flask suit Python, Express.js is minimalistic for Node.js, and Fast API
excels in fast Python development. Choose based on project needs; Spring Boot is
comprehensive, Django is feature-rich, Express.js is lightweight, and Fast API is
performant with automatic documentation. Select according to language
preference, project requirements, and team expertise.
Spring Boot-
• Comprehensive ecosystem with extensive community support.
• Spring Cloud for additional features like service discovery,
configuration management, and circuit breakers.
• Good integration with various data sources and messaging
systems.

You might also like