Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Skilling Exercise 3: 2000030630 M.

Sai Rahul
VACCINES IN INDIA (Data Hiding Vaccine)

As the second wave of covid-19 cases in India is not under control. The central cabinet of
ministers had a meeting and decided to increase the vaccine production.
As present companies do not have the required infrastructure to ramp up the vaccine
production. The officials decided to share the information of 2 vaccine formula’s (Bharath
biotech and Serum institute) to other reputed companies in India.
The companies and officials also do have a fear of the vaccine information might get
manipulated, due to the risk of losing the information to the third-parties the company
decided to develop a program such that only vaccine formula is visible to the end user, but
cannot manipulate the data.

Note: - As the formula is very highly sensible data the company had to keep it as private.

The vaccine formula is already given.


Bharath biotech- an+deg
Serum institute- qpz+rtxc

Develop your java code for the given problem.

CODE:
package lab;

import java.util.Scanner;

public class Vaccines { private String


bharatformula="an+deg"; private String
serumformula="qpz+rtxc";
public String getBharatfomula() {
return bharatformula;
}
public String getSerumformula() {
return serumformula;
}
public static void main(String[] args) {
Vaccines v=new Vaccines();
Scanner sc=new Scanner(System.in);

boolean b=true;
while(b) {
System.out.println("---Vaccines formula---");
System.out.println("1. Bharat Biotech ");
System.out.println("2. Serum Institue ");
System.out.println("Enter Your Choice");
int option=sc.nextInt();
switch(option) {
case 1 :
System.out.print("Bharath Biotech
vaccine Formula :");

System.out.print(v.getBharatfomula()+"\n");
break;
case 2 :
System.out.print("Serum vaccine
formula :");

System.out.print(v.getSerumformula()+"\n");
break;
default :
System.out.print("Please enter a
valid Option ");
b=false;
}

}
sc.close();
}

OUTPUTS:

You might also like