Wednesday, 11 June 2025

Distance Traveled Calculation Java Code Program

The distance a vehicle travels can be calculated as fallout: 
Distance = Speed * Time 
For example, if a train travels 40 miles-per-hour for three hours, the distance traveled is 120 miles. Write a program that asks for the speed of a vehicle (in miles-per-hour) and the number of hours it has traveled. It should use a loop to display the distance a vehicle has traveled for each hour of a time period specified by the user. For example, if a vehicle is traveling at 40 mph for a three-hour time period, it should display a report similar to the one chat follows: 

Hour   Distance Traveled 
-------------------------------
1               40
2               80
3              120
Input Validation: Do not accept a negative number for speed and do not accept any value less than 1 for time traveled.

Code:

package programmingChallenge;
import java.util.*;
public class Question2 
{
public static void main(String[]args)
{
Scanner sc = new Scanner(System.in);
float speed =0,hour;
System.out.println("Enter the speed of a

Average Rainfall Java Code Program

Write a program that uses nested loops to collect data and calculate the average rainfall over a period of years. First the program should ask for the number of years. The outer loop will iterate once for each year. The inner loop will iterate 12 times, once for each month. Each iteration of the inner loop will ask the user for the inches of rainfall for that month. After all iterations, the program should display the number of months, the total inches of rainfall, and the average rainfall per month for the entire period.

Input Validation; Do not accept a number less than 1 for the number of years. Do not accept negative numbers for the monthly rainfall.

Code:

Backward String Java Program

Write a method that accepts a String object as an argument and displays its contents backward. For instance, if the string argument is "gravity" the method should display *yrivaig*. Demonstrate the method in a program that asks the user to input a string and then passes it to the method.


Code:

package programmingChallenges;
import java.util.*;
public class BackwardString {
public static void main(String[]args)

Word Counter Java Program

Write a method that accepts a string object as an argument and returns the number of words it contains. For instance, if the argument is "Four score and seven years ago" the method should return the number 6. Demonstrate the method in a program that asks the user to input a string and then passes it to the method. The number of words in the string should be displayed on the screen. 


Code:

Sunday, 22 October 2023

Inventory Management Mobile Application and Development Project Iqra University

Inventory Management Mobile App Project

Project Proposal:

Introduction:

In today's fast-paced business environment, effective inventory management is crucial to the success of any organization. The purpose of this project is to develop a mobile application that allows small business owners to manage their inventory in real-time, from anywhere.

 

Objectives:

To create a user-friendly and intuitive mobile application for inventory management

To provide real-time updates on inventory levels, reorder points, and stock movements

To generate reports on inventory turnover and stock levels

Monday, 20 June 2022

Assignment - Assembly language-based program for MIPS Architecture based MARS simulator..

Iqra University Computer Organization and Assembly Language Assignment 1.

Write an Assembly language-based program for MIPS Architecture based MARS simulator to take input from user and compare two float numbers. If number one is greater than number two multiply both, and if number one is lesser than number 2; add and subtract both numbers.  

# take 4 numbers input

# then perform multiplication

# and addition between each other 

.data

msgEnterN:   .asciiz "Enter N"

msgAnswer1:   .asciiz "\nMultiply: "

msgAnswer2:   .asciiz "\nAdd: "

msgAnswer3:   .asciiz "\nAverage: "

 click here to see full code.

Saturday, 11 June 2022

Women, hahaha meme video

Women, hahaha Meme Video Context

"Women, hahaha"! The video first posted by YouTube channel named Tipsy Duck. "Infomercial: The Pill" is the name of the video in which you can find the famous meme video "women hahaha".

The original video link: https://tei.ai/BGGP5YlXKkS

The original video link: https://tei.ai/BGGP5YlXKkS

Saturday, 15 September 2018

Kuliyat-e-Iqbal PDF Download

Kuliyat-e-Iqbal PDF

by Allama Muhammad Iqbal


Allama Iqbal is regarded as the great philosopher and poet from South Asia, whose verses are loved , memorised and recited by people of Pakistan everyday. In much of South Asia and the Urdu-speaking world, Iqbal is regarded as the Shair-e-Mashriq. He is also called Mufakkir-e-Pakistan. Below is the complete compilation of his Urdu poetry works. The government of Pakistan officially named him "National Poet of Pakistan"
All books of Allama Iqbal are in Public Domain, and per author’s instruction were never subject to any copyrights or publisher rights.
756 Pages, 24MB
PDF File